state_machine: NoMethodError: protected method `around_validation' in Rails 4.1.0.beta1
Store.first.save
Store Load (0.9ms) SELECT "stores".* FROM "stores" ORDER BY created_at LIMIT 1
(0.2ms) BEGIN
(0.1ms) ROLLBACK
NoMethodError: protected method `around_validation' called for #<StateMachine::Machine:0x007f674cc70f78>
The model has just statemachine
belongs_to :vendor
state_machine :state, :initial => :new do
end
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Reactions: 1
- Comments: 38
Commits related to this issue
- Add monkey patch to statemachine to make #around_validation public (https://github.com/pluginaweek/state_machine/issues/295) — committed to contently/has_messages by kcurtin 10 years ago
- Add monkey patch to statemachine to make #around_validation public (https://github.com/pluginaweek/state_machine/issues/295) — committed to contently/has_messages by kcurtin 10 years ago
- Work around https://github.com/pluginaweek/state_machine/issues/295 — committed to GoodMeasuresLLC/state_machine by johnnaegle 10 years ago
- Added initializer to move state_machine method from protected to public, recommended by https://github.com/pluginaweek/state_machine/issues/295 — committed to okeefm/cypress by deleted user 10 years ago
- Fix NoMethodError `around_validation' Error # Rails 4.1.0.rc1 and StateMachine don't play nice # https://github.com/pluginaweek/state_machine/issues/295 — committed to ugoa/state_machine by deleted user 10 years ago
- workaround for state_machine in Rails 4 https://github.com/pluginaweek/state_machine/issues/295 — committed to mfenner/lagotto by deleted user 10 years ago
- Move arount_validation out of the protected block. This prevents problems like https://github.com/pluginaweek/state_machine/issues/295 — committed to HornsAndHooves/enum_state_machine by albertosaurus 9 years ago
- Monkey patched state_machine to work /w Rails 4.2 Rails 4.1+ and StateMachine don't play nice, see pluginaweek/state_machine#295 for more info — committed to martincik/rails-insights by romansklenar 9 years ago
- Fix for issue with Rails 4.1 https://github.com/pluginaweek/state_machine/issues/295 — committed to agworld/state_machine by deleted user 8 years ago
👍
If you’d like a quick hack, I threw this in my initializers: