Permalink
Browse files

Compatibility with ruby 2.0

Passing true as second argument to respond_to? to check for protected methods in Ruby 2.0.
  • Loading branch information...
1 parent d4e3b89 commit e3f54dbb5dfec2c2736279f2790029412bf559ca @corny corny committed Feb 27, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/inherited_resources/base_helpers.rb
@@ -267,7 +267,7 @@ def respond_with_dual_blocks(object, options, &block) #:nodoc:
# It's extend by HasScopeHelpers.
#
def apply_scopes_if_available(target_object) #:nodoc:
- respond_to?(:apply_scopes) ? apply_scopes(target_object) : target_object
+ respond_to?(:apply_scopes, true) ? apply_scopes(target_object) : target_object
end
# Symbols chain in base helpers return nothing. This is later overwriten

0 comments on commit e3f54db

Please sign in to comment.