Answers for "rails has_many through source 1"

0

rails has_many through source 1

class Pet < ActiveRecord::Base
  has_many :dogs
end

class Dog < ActiveRecord::Base
  belongs_to :pet
  has_many :breeds
end

class Dog::Breed < ActiveRecord::Base
  belongs_to :dog
end
Posted by: Guest on March-24-2022

Code answers related to "rails has_many through source 1"

Browse Popular Code Answers by Language