Sha256: a75c19a7e68040e1f8d99961ccd33f0f6e2af37f7e5a2f7cdeacaceb7d15985a
Contents?: true
Size: 959 Bytes
Versions: 11
Compression:
Stored size: 959 Bytes
Contents
# Rails 4.1.0.rc1 and StateMachine don't play nice # https://github.com/pluginaweek/state_machine/issues/295 require 'state_machine/version' if 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 if Rails.version =~ /^4./ module StateMachine::Integrations::ActiveModel public :around_validation end end if Rails.version =~ /^4.2./ # Hacks around https://github.com/pluginaweek/state_machine/issues/334 module StateMachine::Integrations::ActiveRecord def define_state_initializer define_helper :instance, <<-end_eval, __FILE__, __LINE__ + 1 def initialize(*) super do |*args| self.class.state_machines.initialize_states self yield(*args) if block_given? end end end_eval end end end
Version data entries
11 entries across 11 versions & 2 rubygems