Guest User

Untitled

a guest
Jun 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. Controller:
  2. ---------------------
  3.  
  4. @user = User.find_by_email_and_token(params[:email], params[:token])
  5.  
  6. if @user
  7. @user.attributes = {:token => nil, :state => User::STATE_CONFIRMED}
  8. @user.save(false) #line 36
  9. end
  10.  
  11. Error:
  12. -----------------
  13. RuntimeError in RegistrationController#confirm
  14.  
  15. /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:148:in `transaction'
  16. /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:182:in `transaction'
  17. /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:200:in `save!'
  18. /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
  19. /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:200:in `save!'
  20. ../app/controllers/registration_controller.rb:36:in `confirm'
Add Comment
Please, Sign In to add comment