search for: core_contents

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

2006 Mar 02
0
Select from Many to Many
Here is what I have: add_core_content.rhtml: <select id="resource_core_content_ids" name="resource[core_content_ids][]" size="15" style="width: 200px;" multiple="multiple"> <% @core_contents.each do |c| %> <option value="<%= c.id %>" <% if @resource.core_contents.include? (c) %> selected="selected"<% end %>> <%= c.code %> </option> <% end %> </select> <br/> admin_controller.rb: def ad...
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 ''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 --...
2006 Feb 23
0
Sending parameters for filtering
...@resource.save flash[:notice] = ''Resource was successfully created.'' redirect_to :action => ''new_continued'', :level => @params[:level], :subject => @params[:contentarea] But when I check my development log I see this: SELECT * FROM core_contents WHERE (level = NULL AND subject = NULL) How do I fix this? Seth Buntin Web Resources Coordinator Kentucky Academy of Technology Education Murray State University -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rai...