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? -- 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 -~----------~----~----~----~------~----~------~--~---
Shandy Nantz schrieb:> 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? >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-inplaceeditor-and.html" /ak --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
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 -- 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 -~----------~----~----~----~------~----~------~--~---