# NoMethodError in ClassifiedController#update

**URL:** <https://www.ruby-forum.com/t/nomethoderror-in-classifiedcontroller-update/137146>\
**Category:** Rails\
**Created:** [May 9, 2008, 12:11pm UTC](https://www.ruby-forum.com/t/nomethoderror-in-classifiedcontroller-update/137146 "2008-05-09T12:11:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manika](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8c91f0/32.png) [@manika](https://www.ruby-forum.com/u/manika)\
**Post date:** [May 9, 2008, 12:11pm UTC](https://www.ruby-forum.com/t/nomethoderror-in-classifiedcontroller-update/137146/1 "2008-05-09T12:11:40Z")

</div>

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

# Editing Classified: \<%= @classified.title -%\>
\<%= form\_tag :action =\> 'update', :id =\> @classified %\>

Title  
\<%= text\_field 'classified', 'title' %\>

Price  
\<%= text\_field 'classified', 'price' %\>

Location  
\<%= text\_field 'classified', 'location' %\>

Description  
\<%= text\_area 'classified', 'description' %\>

Category  
\<%= collection\_select(:classified, :category\_id, @categories, :id, :name) %\>

Email  
\<%= text\_field 'classified', 'email' %\>

\<%= submit\_tag "Save changes" %\> \<%= form\_tag %\> \<%= link\_to 'Back', {:action =\> 'list' } %\>
