Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Controller:
- ---------------------
- @user = User.find_by_email_and_token(params[:email], params[:token])
- if @user
- @user.attributes = {:token => nil, :state => User::STATE_CONFIRMED}
- @user.save(false) #line 36
- end
- Error:
- -----------------
- RuntimeError in RegistrationController#confirm
- /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:148:in `transaction'
- /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:182:in `transaction'
- /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:200:in `save!'
- /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
- /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:200:in `save!'
- ../app/controllers/registration_controller.rb:36:in `confirm'
Add Comment
Please, Sign In to add comment