aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-04-03 20:23:23 -0700
committerwycats <wycats@gmail.com>2010-04-03 20:24:30 -0700
commitab8bf9e152ad75c8b358c85e4c95cfde578de127 (patch)
tree1e5887a4c0bdbf0750c359dc8d1c6d2d5585a5bf /actionpack/lib/action_view/helpers/url_helper.rb
parent512b4bccfbe222bd7f94adf6f9af07c2e856767d (diff)
downloadrails-ab8bf9e152ad75c8b358c85e4c95cfde578de127.tar.gz
rails-ab8bf9e152ad75c8b358c85e4c95cfde578de127.tar.bz2
rails-ab8bf9e152ad75c8b358c85e4c95cfde578de127.zip
* Change the object used in routing constraints to be an instance of
ActionDispatch::Request rather than Rack::Request. * Changed ActionDispatch::Request#method to return a String, to be compatible with the Rack::Request superclass. * Changed ActionDispatch::Request#method to return the original method in the case of methodoverride and #request_method not to, to be compatible with Rack::Request
Diffstat (limited to 'actionpack/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 1415966869..5925faf810 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -10,6 +10,12 @@ module ActionView
# This allows you to use the same format for links in views
# and controllers.
module UrlHelper
+ # This helper may be included in any class that includes the
+ # URL helpers of a router (router.url_helpers). Some methods
+ # provided here will only work in the context of a request
+ # (link_to_unless_current, for instance), which must be provided
+ # as a method called #request on the context.
+
extend ActiveSupport::Concern
include ActionDispatch::Routing::UrlFor
@@ -307,7 +313,6 @@ module ActionView
# # </div>
# # </form>"
# #
-
def button_to(name, options = {}, html_options = {})
html_options = html_options.stringify_keys
convert_boolean_attributes!(html_options, %w( disabled ))