Skip to content

Commit

Permalink
Monkey patched state_machine to work /w Rails 4.2
Browse files Browse the repository at this point in the history
Rails 4.1+ and StateMachine don't play nice, see pluginaweek/state_machine#295 for more info
  • Loading branch information
romansklenar committed Apr 20, 2015
1 parent 9655e3c commit aec1c88
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/initializers/state_machine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Rails 4.1 and StateMachine don't play nice
# https://github.com/pluginaweek/state_machine/issues/295

require 'state_machine/version'

unless StateMachine::VERSION == '1.2.0'
# If you see this message, please test removing this file
# If it's still required, please bump up the version above
Rails.logger.warn "Please remove me, StateMachine version has changed"
end

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

0 comments on commit aec1c88

Please sign in to comment.