Checking for errrors after update_attribute

Discussion in 'Ruby' started by k007, Jan 27, 2006.

  1. k007

    k007 Guest

    I am using ruby on rails. Inside a controller, I am using the
    update_attributes method to update
    a database row. I need to check if it went through or if not, I want to
    get the exact error that it encountered. In the view, I am able to use
    error_messages_for:)record) but I need something I can use in the
    controller code.

    Thanks
     
    k007, Jan 27, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dirk Meusel
    Replies:
    1
    Views:
    3,274
    Dirk Meusel
    Aug 19, 2003
  2. Andreas Klemt
    Replies:
    0
    Views:
    937
    Andreas Klemt
    Feb 1, 2004
  3. davidw
    Replies:
    3
    Views:
    542
    Curt_C [MVP]
    Aug 27, 2004
  4. Claire Hill
    Replies:
    4
    Views:
    189
    Claire Hill
    Apr 13, 2009
  5. stylechief

    Checking for undef after performing get()

    stylechief, Jan 10, 2006, in forum: Perl Misc
    Replies:
    5
    Views:
    188
    stylechief
    Jan 10, 2006
  6. chandoo
    Replies:
    2
    Views:
    262
    Dr J R Stockton
    Aug 22, 2007
  7. chandoo
    Replies:
    1
    Views:
    422
    elephant
    Aug 22, 2007
  8. Replies:
    3
    Views:
    348
    Melzzzzz
    Apr 1, 2014
Loading...