Displaying 1 result from an estimated 1 matches for "countrynotetopic".
2007 Feb 18
0
Newbie question on has_may : through and link_to
...in Rails?
class Topic < ActiveRecord::Base
has_many :countrynotes, :through => :countrynotes_topics
has_many :countrynotes_topics
end
class Countrynote < ActiveRecord::Base
belongs_to :country
has_many :countrynotes_topics
has_many :topics, :through => :countrynotes_topics
end
class CountrynoteTopic < ActiveRecord::Base
belongs_to :countrynote
belongs_to :topic
end
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA...