Browse files

Merge pull request #263 from mehanoid/master

Compatibility with Ruby 2.0 (including smart redirects fix)
  • Loading branch information...
2 parents d4e3b89 + 0f252c0 commit 820e4f6bb904b113e20b379d4052b41d321958e8 @joelmoss joelmoss committed Feb 28, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/inherited_resources/base_helpers.rb
View
4 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
@@ -292,7 +292,7 @@ def smart_collection_url
if respond_to? :index
url ||= collection_url rescue nil
end
- if respond_to? :parent
+ if respond_to? :parent, true
url ||= parent_url rescue nil
end
url ||= root_url rescue nil

0 comments on commit 820e4f6

Please sign in to comment.