Browse files

Merge pull request #339 from larspind/patch-1

Allow url_for to still be called with no parameters
  • Loading branch information...
2 parents bf4932a + c4c3e17 commit 174ef17a75bfc0a5e83f4d71966e8306c37991d8 @reed reed committed Feb 3, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/turbolinks/xhr_url_for.rb
View
4 lib/turbolinks/xhr_url_for.rb
@@ -7,7 +7,7 @@ def self.included(base)
base.alias_method_chain :url_for, :xhr_referer
end
- def url_for_with_xhr_referer(options)
+ def url_for_with_xhr_referer(options = {})
options = (xhr_referer || options) if options == :back
url_for_without_xhr_referer options
end
@@ -17,4 +17,4 @@ def xhr_referer
controller.request.headers["X-XHR-Referer"]
end
end
-end
+end

0 comments on commit 174ef17

Please sign in to comment.