I setup a User model with restful_authentication
and then have a Profile model that belongs to it. I've been using fields_for
to combine the fields for editing a User and that user's profile into the User edit view.
I'd like to be able to set a few of the fields to use the in_place_editing
plugin on the User show view. It works fine on the User table fields following the example given
*users_controller.rb*
in_place_edit_for :user, :email
/views/users/show.html.erb
<%= in_place_editor_field :user, :email %>
but I can't figure out how to properly write the controller or the in_place_editor_field
bit on the view for any field that I access on the edit view via:
<% fields_for @up do |profile_fields| %>
<%= profile_fields.text_field :status %>
<% end %>
*in the users_controller (for clarity):*
def edit
@user = User.find(params[:id])
@up = @user.profile
end
How do I create the symbols for something like :user.profile, :status
for the users_controller and /views/users/show.html.erb?
Thanks for all help.