similar to: Select from Many to Many

Displaying 5 results from an estimated 5 matches similar to: "Select from Many to Many"

2006 Mar 01
2
Help with Many-To-Many insert
I am having issues with a many-to-many table. The table relates resources to standards, but in my resources table has one-to-many 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
2007 Jan 15
2
Help with with displaying a selected list.
Hello. I call a find_all_by_subject("action") which returns 2 videos and displays them properly. But when I add @video_pages, @videos = paginate :videos, :per_page => 10 so I can paginate the videos, it displays ALL the videos as if I selected list videos. Can someone please tell me what I am doing wrong? Thank you. selectaction.rhtml <table> <tr> <% x = 0 %>
2006 Feb 16
0
Observer two fields?
Can I observer two fields? I have a select menu for subject level and a select menu for content area and I wasn''t to get all fields from a table that correlate to that @cores = CoreContent.find(:all, :condition => "subject = ''@params[resource_subject_id]'' and level = ''@params[resource_level_id]''") Seth Buntin Web Resources
2006 Feb 23
0
Sending parameters for filtering
I have a many-to-many table I have standards that I want to assign to resources. In my form I have spit the form into two pages. The first page gets most of the information about the resource and stuff and I want it to send two parameters to the next page so I can "filter" out some of the standards. I have this: @resource = Resource.new(params[:resource])
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: