In my console I save models like this:
billy = Student.first
billy.name = 'Billy'
billy.save
Works as expected. However, after I call an ApplicationMailer in the console, the above mechanism no longer works :(
MyMailer.send_some_emails
billy.name = 'Jimmy'
billy.save # returns true
billy.save! # no exception thrown
billy.reload
billy.name # will return 'Billy', not 'Jimmy' as expected
Any ideas?
ActiveRecord::Base.logger = Logger.new(STDOUT). - shock_oneUPDATEstatement output. In the second case though, there is nothing sent to the database. We just seebegin transactionfollowed immediately bycommit transaction- at.show-method billy.saveto make sure it's not redefined.billy.update_attributes(name: 'Jimmy')to see if other persisting methods work. Save another instance of this model. Save an instance of another model. - shock_one