Merge branches 'dev_aliyun', 'dev_cxt' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_cxt
commit
f78ab62f5c
@ -0,0 +1,2 @@
|
|||||||
|
class Curriculum < ApplicationRecord
|
||||||
|
end
|
@ -0,0 +1,3 @@
|
|||||||
|
class KnowledgePoint < ApplicationRecord
|
||||||
|
belongs_to :curriculum
|
||||||
|
end
|
@ -0,0 +1,3 @@
|
|||||||
|
class KnowledgePointContainer < ApplicationRecord
|
||||||
|
belongs_to :knowledge_point
|
||||||
|
end
|
@ -1,6 +1,6 @@
|
|||||||
json.partial! 'shixuns/right', locals: { shixun: @shixun }
|
json.partial! 'shixuns/right', locals: { shixun: @shixun }
|
||||||
|
|
||||||
json.follow follow?(@shixun.owner, User.current)
|
# json.follow follow?(@shixun.owner, User.current)
|
||||||
json.fans_count @fans_count
|
# json.fans_count @fans_count
|
||||||
json.followed_count @followed_count
|
# json.followed_count @followed_count
|
||||||
json.user_shixuns_count @user_own_shixuns
|
json.user_shixuns_count @user_own_shixuns
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
class CreateCurriculums < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
create_table :curriculums do |t|
|
||||||
|
t.string :name
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,10 @@
|
|||||||
|
class CreateKnowledgePoints < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
create_table :knowledge_points do |t|
|
||||||
|
t.references :curriculum, foreign_key: true
|
||||||
|
t.string :name
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,11 @@
|
|||||||
|
class CreateKnowledgePointContainers < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
create_table :knowledge_point_containers do |t|
|
||||||
|
t.integer :container_id
|
||||||
|
t.string :container_type
|
||||||
|
t.references :knowledge_point, foreign_key: true
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe Curriculum, type: :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe KnowledgePointContainer, type: :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe KnowledgePoint, type: :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
Loading…
Reference in new issue