Sumanth Krishna wrote: > try with update_attributes! (which internally uses 'save!') > > On Fri, Mar 13, 2009 at 2:00 PM, Nilesh Kulkarni < > [email protected]> wrote: > >> and 2028" >> 50 don 2000 $400 >> >> if I provide wrong input for one say year "1800" for "don" and correct >> for "james bond" year as "2000" it updates James bond ,correctly but do >> not show validation message for "don" on my page. I want to display >> message how can i do that >> -- >> Posted via http://www.ruby-forum.com/. >> >> > >> > > > -- > -- > Thanks & Regards, > Sumanth Krishna. A > +358 40 3276564 > > Blogs: > TwinclingCommunity: > > http://sumanthtechsavvy.blogspot.com/ > http://www.twincling.org/node/227 > > http://yourway2health.blogspot.com/ > http://www.osef.twincling.org hi
I have used update_attributes! it shows validation message ActiveRecord::RecordInvalid in BookController#edit_book Validation failed: Year should be a above 1900 on different page ,but i want that message must be displayed on same page on top my controller look like this def edit_book if request.post? # code for update data ie "update_attribute!" method end @books = Book.find(:all) end and I have view named "edit_book.html.erb" -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

