I''m having the same issue. I think it''s because I have the
default
routes off, but I can''t find any reference to what the route should
be. If I put the default routes back in just to test, it works.
Wait, I just checked the source. You should see something like this:
<span class="in_place_editor_field"
id="page_text_1_in_place_editor"></span><script
type="text/javascript">
//<![CDATA[
new Ajax.InPlaceEditor(''page_text_1_in_place_editor'',
''/groups/set_page_text/1'', {rows:1})
//]]>
</script>
So, in your case, just make sure that /users/set_user_first_name/ is a
known route and you should be good to go.
Sean
On 10/14/07, Mario Flores
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> I''m trying to create an edit in place profile update page, using
> in_place_editor_field. Every time I try, I keep getting this error
>
> No route matches {:action=>"set_user_first_name",
:id=>"1"}
>
> Would any know what the problem might be? The relevant code is blow.
>
>
> Link to users_controller.rb
> <code>
> in_place_edit_for :user, :first_name
>
> # profile edit page
> def update
> @user = User.find_by_user_name(params[:user_name])
> end
> </code>
>
> Link from index to Update Action
> <code>
> <%= link_to ''Your Profile'', update_user_url(:user_name
=>
> current_user.user_name, :id => current_user.id) %>
> </code>
>
>
> Update.rhtml
> <code>
> <%= in_place_editor_field :user, :first_name %>
> </code>
> --
> 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
-~----------~----~----~----~------~----~------~--~---