0
你好,我必须像模型一样;模型中的一列到另一个模型
class CreateLecturers < ActiveRecord::Migration
def change
create_table :lecturers do |t|
t.string :firstname
t.string :lastname
t.string :position
t.string :email
t.timestamps null: false
end
end
end
这是我的第二个模型。
class CreateCurriculums < ActiveRecord::Migration
def change
create_table :curriculums do |t|
t.string :title
t.integer :hours
t.integer :year
t.text :description
t.timestamps null: false
end
end
end
我想迁移到课程讲师。但不是与id,标题 它可能如何?
所以我使用rails-admin。当我添加一些课程,我想选择下拉讲师,当我添加一些讲师,我想在模型之间选择课程。