Taken from the shore at Blackrock.
This is a stupid fucking thing, akin to Googling basic syntax for your language, but here we are. My underling and I wasted 40 minutes today re-figuring this out.
class PluralSingular < ActiveRecord::Migration[5.0] create_join_table :plural, :plural end
app/model/foo.rb class Foo < ApplicationRecord has_many :plural_singular has_many :plural, through: :plural_singular end
app/model/plural_singular.rb class PluralSingular < ApplicationRecord belongs_to :foo belongs_to :bar end
Taken at Blackrock Park.
Time’s an arrow, one way, here to there, that you can’t turn back. Because that’d be nonsensical, to undo what makes you, you.