Forum: Ruby on Rails in_place_edit_field

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C4bfcc81ac9281cb905f38e97e4d4e0b?d=identicon&s=25 Shandy Nantz (snantz)
on 2007-07-06 21:42
I have this tables in my database: "user" with such fields as "first",
"last", for the first and last name. Now, I want to make it so after
these values are submitted to the database the user can still edit their
personal info in place with the in_place_editor_field helper. The code
is as follows:

<%= in_place_editor_field 'user','first',{}, :cols=>30%>

I cannot, however, get this helper to hit the database and resubmitt the
user data. It doesn't make sense that these helpers would be in a form,
so how do you get this helper to write back to a database?
10a8337cf8879d37affd54e1cab4d79e?d=identicon&s=25 Andy Koch (Guest)
on 2007-07-06 23:19
(Received via mailing list)
Shandy Nantz schrieb:
> so how do you get this helper to write back to a database?
>

not entirely understanding your issue, but it sounds like your
controller method is the problem.

perhaps read this blog post
"http://rubythis.blogspot.com/2006/11/using-rails-i...

/ak
C4bfcc81ac9281cb905f38e97e4d4e0b?d=identicon&s=25 Shandy Nantz (snantz)
on 2007-07-06 23:19
Shandy Nantz wrote:
> I have this tables in my database: "user" with such fields as "first",
> "last", for the first and last name. Now, I want to make it so after
> these values are submitted to the database the user can still edit their
> personal info in place with the in_place_editor_field helper. The code
> is as follows:
>
> <%= in_place_editor_field 'user','first',{}, :cols=>30%>
>
> I cannot, however, get this helper to hit the database and resubmitt the
> user data. It doesn't make sense that these helpers would be in a form,
> so how do you get this helper to write back to a database?

I got it, in your controller you have to say:

in_place_edit_for :user, :first
This topic is locked and can not be replied to.