Rails migration: t.references with alternative name?
- by marienbad
So I have a create_table like this for Courses at a School:
create_table :courses do |t|
t.string :name
t.references :course
t.timestamps
end
but I want it to reference TWO other courses like:
has_many :transferrable_as #a Course
has_many :same_as #another Course
can I say
t.references :transferrable_as, :as= :course
?