From 5c7bcfc111275087d428e7f446d10bf31f1c841c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sun, 8 Apr 2012 23:54:36 -0300 Subject: default_url_options does not receive one argument anymore --- railties/guides/source/action_controller_overview.textile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'railties/guides/source') 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 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 -- cgit v1.2.3 From 6f4f499845ad1eb14a0fdc4f495ee33b0c22ed8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sun, 8 Apr 2012 23:54:59 -0300 Subject: Document that default_url_options must return a hash with symbolized keys --- railties/guides/source/action_controller_overview.textile | 1 + 1 file changed, 1 insertion(+) (limited to 'railties/guides/source') diff --git a/railties/guides/source/action_controller_overview.textile b/railties/guides/source/action_controller_overview.textile index 6b90ddce5a..99a3480e6d 100644 --- a/railties/guides/source/action_controller_overview.textile +++ b/railties/guides/source/action_controller_overview.textile @@ -152,6 +152,7 @@ You can set global default parameters that will be used when generating URLs wit class ApplicationController < ActionController::Base + # This method must return a hash with symbolized keys. def default_url_options {:locale => I18n.locale} end -- cgit v1.2.3