DeXy.31337-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Apr-17 12:39 UTC
Validating uniquesness through double association?
Hello all! Could someone give me idea how to solve following problem. In the model: class A < ActiveRecord::Base has_many :B end class B < ActiveRecord::Base belongs_to :A has_and_belongs_to_many :C end class C < ActiveRecord::Base has_and_belongs_to_many :B end Is it possible to validate that C has only B''s that belong to the same A ? %) Will be happy to see any answers)) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---