Anonymous avatar Anonymous committed b95de6a

[svn] current_url now accepts arguments to pass along to url_for
Fixes #251

Comments (0)

Files changed (2)

 WebHelpers ChangeLog
 
 0.3.1 (**svn**)
+* current_url now accepts arguments to pass along to url_for. Fixes #251.
 * Updated prototype to 1.5.1.
 * Added image support to button_to. Patch by Alex Conrad. Fixes #184.
 * Fix radio_button and submit_to_remote not handling unicode values.

webhelpers/rails/urls.py

     else:
         return url == currl
 
-def current_url():
+def current_url(*args, **kwargs):
     """
     Returns the current page's url.
     """
     qs = environ.get('QUERY_STRING', '')
     if qs:
         qs = '?' + qs
-    return url_for() + qs
+    return url_for(*args, **kwargs) + qs
 
 def convert_options_to_javascript(confirm=None, popup=None, post=None, method=None, **html_options):
     if post and not method:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.