If you use alias_attribute on a state machine attribute, you can correctly use the aliased getters and setters. However, initializing a model with a hash containing the aliased attribute fails to set the state.
This is inconsistent with how attributes are supposed to work in ActiveModel.
@seuros is there any interest in fixing this issue? I've been looking at the source code, but am still familiarizing myself with where to hone in on the proper fix.
If you use
alias_attribute
on a state machine attribute, you can correctly use the aliased getters and setters. However, initializing a model with a hash containing the aliased attribute fails to set the state.This is inconsistent with how attributes are supposed to work in ActiveModel.
A simple example: