Skip to content

Commit

Permalink
Merge pull request #346 from 110y/suppress_warning_when_using_enum
Browse files Browse the repository at this point in the history
Suppress warnings when using ActiveRecord enums feature
  • Loading branch information
alto committed May 3, 2016
2 parents 2981e68 + 413d2fd commit 275e2f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/aasm/base.rb
Expand Up @@ -193,7 +193,7 @@ def configure(key, default_value)
end

def safely_define_method(klass, method_name, method_definition)
if klass.instance_methods.include?(method_name.to_sym)
if !@options[:enum] && klass.instance_methods.include?(method_name.to_sym)
warn "#{klass.name}: overriding method '#{method_name}'!"
end

Expand Down

0 comments on commit 275e2f8

Please sign in to comment.