How can I see why @item.save is failing? I checked debug.log but it is not being helpful at all... Is there any other way or log file? Thanks!!! what debug.log says:.. [4;35;1mSQL (0.000000) BEGIN [4;36;1mSQL (0.000000) [0;1mCOMMIT -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 26, 12:43 pm, Vic <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> How can I see why @item.save is failing? I checked debug.log but it is > not being helpful at all... > Is there any other way or log file? Thanks!!!Perhaps validations are failing for your object? Try logger.debug @item.errors.full_messages right after @item.save, and see if that leads anywhere helpful. Jeff softiesonrails.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 -~----------~----~----~----~------~----~------~--~---
Thanks, looking at @item.errors uncovered the problem!! Jeff Cohen wrote:> On Mar 26, 12:43 pm, Vic <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> How can I see why @item.save is failing? I checked debug.log but it is >> not being helpful at all... >> Is there any other way or log file? Thanks!!! > > Perhaps validations are failing for your object? > > Try > > logger.debug @item.errors.full_messages > > right after @item.save, and see if that leads anywhere helpful. > > Jeff > softiesonrails.com-- 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 -~----------~----~----~----~------~----~------~--~---