i understand how to define simple relations between two tables as discussed here:
http://guides.rubyonrails.org/getting_started.html#adding-a-second-model
and here: Rails 4.2 foreign key
but, how does one define multiple references to the same model in a migration? say for example using the prior posts:
add_foreign_key :articles, :authors
and that you want to have both a reference to the author, and say the editor who is also an author. which would end up with something like this in the model in prior versions of rails:
belongs_to :editor, :class_name => "Author", :foreign_key => "editor_id"
furthermore is there a syntax for defining this at the rails g scaffold level or would i have to modify the migration after?