state_machines-activerecord
state_machines-activerecord copied to clipboard
StateMachines Active Record Integration
- Models inherit `ApplicationRecord` -> not `ActiveRecord::Base` - `validates_presence_of` -> `validates :attr_name, presence: true` Just creating this issue so I can mention it in my little pr #100 filling it
Fixes https://github.com/state-machines/state_machines-activemodel/issues/2
This is the rebased version of #67. There were no conflicts at all so we're good to merge.
allow to chain scopes and scopes are transparent if no values are given to it. fix https://github.com/state-machines/state_machines-activerecord/issues/66
I have a state machine on a class that inherits from `ActiveRecord::Base` that's something like this: ```ruby state_machine :state do state :one, :two do validate { |record| record.validate_has_gubbins } end...
Let me preface this by saying that this is probably pretty non-standard, but I discovered a bug that is pretty reproducible and it occurs when we're trying to operate two...
Hi! I've noticed that callbacks for implicit event transitions don't work. Example: ``` state_machine :state, initial: :profile_details do event :pending do transition from: all - [:pending, :approved, :rejected], to: :pending...
In an existing model, my state column is a Rails enum and using state_machine on this column generates some warnings (and probably does not work) : ``` Instance method "processing?"...