Displaying 3 results from an estimated 3 matches for "corecontent".
Did you mean:
com_content
2006 Mar 02
0
Select from Many to Many
...lue="<%= c.id %>" <% if @resource.core_contents.include?
(c) %> selected="selected"<% end %>>
<%= c.code %>
</option>
<% end %>
</select>
<br/>
admin_controller.rb:
def add_core_content
@core_contents = CoreContent.find_all_by_subject(@params["subject"],
:order => ''level ASC'')
end
Everything works fine if I don''t have:
<% if @resource.core_contents.include? (c) %> selected="selected"<% end
%>
But when that is included I get an error:...
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 --------------
An HTML...
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 Coordinator
Kentucky Academy of Technology Education
Murray State University
-------------- next part -...