How do I change an enum value without saving the model to the database yet?
The documentation for ActiveRecord::Enum indicates that methods like conversation.active!
and conversation.status = "archived"
is equivalent to doing conversation.update! status: 1
, whereas I'm getting attributes from a simple_form form, and I don't want to save the model until all of the attributes have been set, as otherwise the model won't be valid.