Мне нужна помощь с моими ассоциациями Rails 4. У меня есть следующие 4 модели:Rails 4 Ассоциации: Справка по созданию базы данных
class User < ActiveRecord::Base
has_many :check_ins
has_many :weigh_ins, :through => :check_ins
has_many :repositionings, :through => :check_ins
end
class CheckIn < ActiveRecord::Base
belongs_to :user
has_one :weigh_in
has_one :repositioning
end
class Repositioning < ActiveRecord::Base
# belongs_to :user
belongs_to :check_in
end
class WeighIn < ActiveRecord::Base
# belongs_to :user
belongs_to :check_in
end
Вопрос: Если я настроить таким образом, как бы я вход repositionings
и weigh_ins
отдельно, но до сих пор они связаны между собой через единый чек в?