Permalink
Browse files

added &block as 3rd method argument to make sure it doesn't raise ano…

…ther argument error if a block is supplied
  • Loading branch information...
1 parent 7672e7e commit ffd2739d9cc85cffc607597f33b05fe12e9df23c @hukl hukl committed with hukl Jan 11, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/globalize/active_record.rb
View
2 lib/globalize/active_record.rb
@@ -107,7 +107,7 @@ def required_attributes
end.map(&:name)
end
- def respond_to?(method, *args)
+ def respond_to?(method, *args, &block)
method.to_s =~ /^find_by_(\w+)$/ && translated_attribute_names.include?($1.to_sym) || super
end

0 comments on commit ffd2739

Please sign in to comment.