I’m trying to use a dropdown to select the id of a record to load.
My view code:
<%= form_remote_tag :update=>“editAread”, :url => {:action =>
“loadArea”} %>
<%=collection_select(:area, :id, @areas, :id, :name ) %> <%=
submit_tag ‘Load’ %>
<%= end_form_tag %>
Then the controller code:
def loadArea
@editArea=ContentArea.find(params[:area])
render :partial => “editArea”
end
But I get this error:
Unknown key(s): id
There is an id field in the content_areas table. What am I missing here?