search for: core_contents_resourc

Displaying 3 results from an estimated 3 matches for "core_contents_resourc".

2006 Mar 01
2
Help with Many-To-Many insert
...relationships so those also appear in my many-to-many table. I am trying to insert into the table via: @resource.core_contents << CoreContent.find(params[:core_content_ids]) But I get this error: Mysql::Error: Duplicate entry ''0-0-0-0-0-0'' for key 1: INSERT INTO core_contents_resources () VALUES () What is the problem? Thanks for the help. Seth Buntin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060301/94fa1a5f/attachment-0001.html
2006 Mar 02
0
Select from Many to Many
...ot;> 2: <% @core_contents.each do |c| %> 3: <option value="<%= c.id %>" <% if @resource.core_contents.include? (c) %> selected="selected"<% end %>> 4: <%= c.code %> 5: </option> 6: <% end %> My many-to-many is core_contents_resources any my models are set up correctly (having the habtm in both models). I know that I am getting something with @resource.core_contents because I get information returned (albeit unreadable, #<CoreContent:0x3321598>#<CoreContent:0x3321550>#<CoreContent:0x3321508> #<CoreContent...
2006 Feb 27
0
DB error
I am getting this error: Mysql::Error: Field ''core_contents_id'' doesn''t have a default value: INSERT INTO core_contents_resources () VALUES () When I try to insert records into a many-to-many table. Can anyone tell me why? Seth Buntin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060227/9921b063/attachment-0001.html