state_machine: around_validation error for Rails4.1.0beta

Hello!

I have following problem:

Page.last.to_draft
  Page Load (0.2ms)  SELECT "pages".* FROM "pages" ORDER BY "pages"."id" DESC LIMIT 1
   (0.1ms)  begin transaction
   (0.1ms)  rollback transaction
NoMethodError: protected method `around_validation' called for #<StateMachine::Machine:0x00000004382b98>
bin/rails --version
Rails 4.1.0.beta

Maybe it’s will be interesting for somebody.

Thank you!

About this issue

  • Original URL
  • State: open
  • Created 11 years ago
  • Reactions: 8
  • Comments: 93

Commits related to this issue

Most upvoted comments

config/initializers/state_machine_patch.rb

module StateMachine
  module Integrations
     module ActiveModel
        public :around_validation
     end
  end
end

Thank You!

On Apr 12, 2015, at 12:15 PM, Niels Hoffmann notifications@github.com wrote:

If it has not come to your attention yet, there is a maintained fork of this project by @seuros, which is probably a better solution than to monkeypatch this abandoned project.

https://github.com/state-machines/state_machines

— Reply to this email directly or view it on GitHub.

If it has not come to your attention yet, there is a maintained fork of this project by @seuros, which is probably a better solution than to monkeypatch this abandoned project.

https://github.com/state-machines/state_machines

Maybe instead of continuously stamping +1, we can create a community fork and finally keep on with the development?

guys just use AASM (Acts As State Machine), its a shame to see this one go but its had no activity for a while