Im using the in_place_editor_field helper to make certain fields easily editable and able to update the database on the spot. The problem is that all this stuff gets submitted to the database on one page in a form. On the next page, the idea is that there is another form for submitting more user data but now the previously submitted data is reshown to make it editable in case there was an error in entering some bit of info. I am using the in_place_editor_field because to me it doesn''t make sence to use another form. The problem is that there can be some fields that are left blank and that the user might want to add info to later in the process, but because they are left blank they are not editable even using the in_place_editor_field helper. Is there anyway that anyone can think of to have the fields editable even though there might not be nothing more then a empty string in the database. I have tried checking to see if the user data is nil but that doesn''t seem to do much: <% if @user.addr.nil? %> Thanks, Shandy -- 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 -~----------~----~----~----~------~----~------~--~---
Just fill the empty strings before rendering the action... MODEL.content_columns.each do |column| write_attribute(column.name, ''Edit'') if read_attribute(column.name).blank? end HTH, - H On 7/9/07, Shandy Nantz <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Im using the in_place_editor_field helper to make certain fields easily > editable and able to update the database on the spot. The problem is > that all this stuff gets submitted to the database on one page in a > form. On the next page, the idea is that there is another form for > submitting more user data but now the previously submitted data is > reshown to make it editable in case there was an error in entering some > bit of info. I am using the in_place_editor_field because to me it > doesn''t make sence to use another form. The problem is that there can be > some fields that are left blank and that the user might want to add info > to later in the process, but because they are left blank they are not > editable even using the in_place_editor_field helper. Is there anyway > that anyone can think of to have the fields editable even though there > might not be nothing more then a empty string in the database. I have > tried checking to see if the user data is nil but that doesn''t seem to > do much: > > <% if @user.addr.nil? %> > > Thanks, Shandy > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Husein Choroomi Yucca Intelligence Development http://www.YuccaHQ.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 -~----------~----~----~----~------~----~------~--~---
That did it. Thanks for your help. ~S -- 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 -~----------~----~----~----~------~----~------~--~---