state-machines / state_machines

Adds support for creating state machines for attributes on any Ruby class
https://github.com/state-machines/state_machines
MIT License
814 stars 91 forks source link

Disable direct attribute assignment #84

Closed kevintraver closed 2 years ago

kevintraver commented 2 years ago

Is there a way to disable direct attribute assignment?

The aasm gem has something like this:

https://github.com/aasm/aasm/blob/ee147c60bc4ba356e0e8ce0ffa3f69d0476f8ce8/README.md#L797-L823

rafaelfranca commented 2 years ago

There is no way to do that. But open for a PR.

Thank you for the issue.