search for: parent_th

Displaying 2 results from an estimated 2 matches for "parent_th".

Did you mean: parent_id
2006 Mar 29
4
:through alternate
I''d like to use :through to create a web of associations like: class Thing < ActiveRecord::Base has_many :child_things, :through => :thing_thing has_many :parent_things, :through => :thing_thing, :some_other_option? end class ThingThing < ActiveRecord::Base belongs_to :thing belongs_to :child_thing, :class_name => ''Thing'', :foreign_key => ''child_thing_id'' end The child_things works. The parent_things does...
2006 Sep 25
2
How to insert data into a relational database?
Hi. Please do bear with me as I am a newbie. I think I understand how to setup the relation using "has_many" with "through". What I need to know is how to insert data into the tables in the controller. For example, I have company details like name, address and country. I also have a category table like audio, video, events and lighting. Once I setup the relations, I need