Topic: need help on in_place_editor

Hey all,
I do a:
<% for c in @categories %>
<% @category = c %>
<%= in_place_editor_field :category, :name %>
<% end %>

but I keep getting the error:
Unknown action
No action responded to set_category_name

so I wrote a little function:
def set_category_name
    @category = Category.find(params[:id])
    @category.update_attributes(params[:category])
   end


but then I get
Template is missing
Missing template script/../config/../app/views/categories/set_category_name.rhtml

I'm probably missing something on hao to use the in place editor thing. How can I tell it to just update my category's name?

I did put   in_place_edit_for :name in my controller

thanx in advance

Pat

Re: need help on in_place_editor

You need to specify "category" in the in_place_edit_for method:

in_place_edit_for :category, :name

This will automatically create the set_category_name action, so you'll need to remove any custom action so it doesn't override it. Does that work?

Railscasts - Free Ruby on Rails Screencasts

Re: need help on in_place_editor

yes it works thanx. Sorry for the late answer.