Skip to content
Browse files

default_url_options does not receive one argument anymore

  • Loading branch information...
1 parent 9f37f33 commit 9efe01ef0d332239f37a211e2351f107de5d235b @rafaelfranca rafaelfranca committed Apr 8, 2012
View
2 actionpack/test/controller/base_test.rb
@@ -45,7 +45,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
@@ -566,7 +566,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 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

0 comments on commit 9efe01e

Please sign in to comment.
Something went wrong with that request. Please try again.