Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

default_url_options does not receive one argument anymore

  • Loading branch information...
commit 5c7bcfc111275087d428e7f446d10bf31f1c841c 1 parent 56d9945
@rafaelfranca authored
View
2  actionpack/test/controller/base_test.rb
@@ -68,7 +68,7 @@ def from_view
render :inline => "<%= #{params[:route]} %>"
end
- def default_url_options(options = nil)
+ def default_url_options
{ :host => 'www.override.com', :action => 'new', :locale => 'en' }
end
end
View
2  actionpack/test/template/url_helper_test.rb
@@ -548,7 +548,7 @@ def test_url_for_nil_returns_current_path
def test_named_route_should_show_host_and_path_using_controller_default_url_options
class << @controller
- def default_url_options(options = nil)
+ def default_url_options
{:host => 'testtwo.host'}
end
end
View
3  railties/guides/source/action_controller_overview.textile
@@ -152,8 +152,7 @@ You can set global default parameters that will be used when generating URLs wit
<ruby>
class ApplicationController < ActionController::Base
- # The options parameter is the hash passed in to 'url_for'
- def default_url_options(options)
+ def default_url_options
{:locale => I18n.locale}
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.