diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-04-08 23:54:36 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-04-08 23:54:36 -0300 |
commit | 5c7bcfc111275087d428e7f446d10bf31f1c841c (patch) | |
tree | 1fe030edf1ac79824e33d44829f32c6e851627fa | |
parent | 56d9945e8a9613c2983c3ab60600bac6e58b58d8 (diff) | |
download | rails-5c7bcfc111275087d428e7f446d10bf31f1c841c.tar.gz rails-5c7bcfc111275087d428e7f446d10bf31f1c841c.tar.bz2 rails-5c7bcfc111275087d428e7f446d10bf31f1c841c.zip |
default_url_options does not receive one argument anymore
-rw-r--r-- | actionpack/test/controller/base_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/url_helper_test.rb | 2 | ||||
-rw-r--r-- | railties/guides/source/action_controller_overview.textile | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index 145ef12b94..affa9a6add 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -68,7 +68,7 @@ class DefaultUrlOptionsController < ActionController::Base 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 diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index bc45fabf34..734b6f3aef 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -548,7 +548,7 @@ class UrlHelperControllerTest < ActionController::TestCase 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 diff --git a/railties/guides/source/action_controller_overview.textile b/railties/guides/source/action_controller_overview.textile index bc85f07ecc..6b90ddce5a 100644 --- a/railties/guides/source/action_controller_overview.textile +++ b/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 |