My project was working when I add new field category
It is showing the error in create form and edit form
i am sending u controller file as attechment
this is my model(category.rb) dor category file
class Category < ActiveRecord::Base
has_many :classifieds
end
and this is edit.rhtml
<h1>Editing Classified: <%= @classified.title -%></h1>
<%= form_tag :action => ''update'', :id => @classified
%>
<p><label
for="classified_title">Title</label><br/>
<%= text_field ''classified'', ''title''
%></p>
<p><label
for="classified_price">Price</label><br/>
<%= text_field ''classified'', ''price''
%></p>
<p><label
for="classified_location">Location</label><br/>
<%= text_field ''classified'', ''location''
%></p>
<p><label
for="classified_description">Description</label><br/>
<%= text_area ''classified'', ''description''
%></p>
<p><label
for="classified_category">Category</label><br />
<%= collection_select(:classified, :category_id, @categories,
:id, :name) %></p>
<p><label
for="classified_email">Email</label><br/>
<%= text_field ''classified'', ''email''
%></p>
<%= submit_tag "Save changes" %>
<%= form_tag %>
<%= link_to ''Back'', {:action => ''list''
} %>
Attachments:
http://www.ruby-forum.com/attachment/1883/classified_controller.rb
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---