Displaying 3 results from an estimated 3 matches for "datasetid".
2006 Jul 11
4
checkboxes with a has_many :through relation
...s_many relationship using the post values of these
checkboxes. Essentially, I want to populate the relationship table
which will create the correct join values in my model.
Here is my check_box_tag code:
<%= check_box_tag("@current_job[target_list_ids][]",
tlist.DataSetID,
@current_job.target_lists.include?(tlist)) %>
So, in this example, tlist is an element of another array that I''m
starting with to give me the list of choices. But what I want is to
assign these choices into the "target_lists" collection of my
@current_...
2006 Jun 27
3
belongs_to <parent name>, :foreign_key modifier not working
All,
I have two ActiveRecord objects.
TargetList has_many Targets
Targets belongs_to TargetList
I''ve specified
belongs_to :target_list,
:foreign_key => ''DataSetID''
Queries generated by various methods in target_list do not seem to see
the
foreign_key name and keep trying to query my Target table using
"target_list_id" (the default foreign key).
Anyone seen this before?
Wes
--
Posted via http://www.ruby-forum.com/.
2006 Jul 10
10
has_many :through and foreign key parameters
I just took my HABTM and turned it into a :through since my join table
has another "non-joiny" attribute.
I went from this:
has_many_and_belongs_to :jobs, :join_table => ''tablename'',
:foreign_key => ''x'',
:association_foreign_key => ''y''
to this:
has_many :jobs, :through =>