diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-08 14:35:43 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-08 14:35:43 -0700 |
commit | ece76f3840fb0327e58f91d6091beb66801deaed (patch) | |
tree | b67520364f3081d0e49a3c76582c799017e29acc /activesupport/lib | |
parent | cecef59fa2f670bbd5b61fcaf54bceae2c4628b0 (diff) | |
download | rails-ece76f3840fb0327e58f91d6091beb66801deaed.tar.gz rails-ece76f3840fb0327e58f91d6091beb66801deaed.tar.bz2 rails-ece76f3840fb0327e58f91d6091beb66801deaed.zip |
adding tests for lambdas as conditions
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index ee4b3fe6bb..e948314be7 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -314,7 +314,7 @@ module ActiveSupport @klass.send(:define_method, method_name, &filter) return method_name if filter.arity <= 0 - method_name << (filter.arity == 1 ? "(self)" : " self, ::Proc.new ") + method_name << (filter.arity == 1 ? "(self)" : "(self, ::Proc.new)") else method_name = _method_name_for_object_filter(kind, filter) @klass.send(:define_method, "#{method_name}_object") { filter } |