Forum: Ruby on Rails Update fails Rollback?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7728d3daa0e59374b1869ef024eb6ee9?d=identicon&s=25 Morgan Morgan (morgan)
on 2009-06-03 02:36
this is my code

  def usermod
    User.update(10, :user_level => 3)
  end



this is what shows in the console

Processing UserController#usermod (for 127.0.0.1 at 2009-06-02 20:28:38)
[GET]
  SQL (0.1ms)   SET SQL_AUTO_IS_NULL=0
  User Load (0.5ms)   SELECT * FROM `users` WHERE (`users`.`id` = 10)
  User Columns (2.5ms)   SHOW FIELDS FROM `users`
  CACHE (0.0ms)   SELECT * FROM `users` WHERE (`users`.`id` = 10)
  SQL (0.1ms)   BEGIN
  User Exists (1.7ms)   SELECT `users`.id FROM `users` WHERE
(`users`.`login` = BINARY 'gorpie' AND `users`.id <> 10) LIMIT 1
  User Exists (0.5ms)   SELECT `users`.id FROM `users` WHERE
(`users`.`email` = BINARY 'n' AND `users`.id <> 10) LIMIT 1
  SQL (0.1ms)   ROLLBACK
Rendering template within layouts/application
Rendering user/usermod
Completed in 27ms (View: 10, DB: 6) | 200 OK
[http://localhost/user/usermod]
7728d3daa0e59374b1869ef024eb6ee9?d=identicon&s=25 Morgan Morgan (morgan)
on 2009-06-03 03:34
turns out my validations were angry at the invalid email address in the
account.

blarf.
This topic is locked and can not be replied to.