Skip to content

Commit

Permalink
fixes jeffp#60 check if method exists, private & public
Browse files Browse the repository at this point in the history
  • Loading branch information
cattywampus committed Oct 28, 2013
1 parent 84221b8 commit c6aab3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/enumerated_attribute/integrations/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def new(*args, &block)
result
end
end
unless private_method_defined?(:method_missing_without_enumerated_attribute)
unless method_defined?(:method_missing_without_enumerated_attribute) || private_method_defined?(:method_missing_without_enumerated_attribute)
define_chained_method(:method_missing, :enumerated_attribute) do |method_id, *arguments|
arguments = arguments.map{|arg| arg.is_a?(Symbol) ? arg.to_s : arg }
method_missing_without_enumerated_attribute(method_id, *arguments)
Expand Down

0 comments on commit c6aab3e

Please sign in to comment.