Closed kjgarza closed 5 years ago
@kjgarza The saving to ActiveRecord should happen via the aasm_state gem: https://github.com/aasm/aasm#activerecord
ok, I can see that. In the validation I did, that does not seem to be working (saving to AR) . Probably , the transitions calls are missing the Bang!.
job.aasm.fire!(:run) # saved
I'll check the AASM docs
Thanks! If aasm_state saves to active_record, write_attribute
makes sense, reducing the number of database calls. Also, this was the working code used before switching to aasm_state
, see commit history.
write_attribute does not save to active record.
This change is