From 2c33d0e19175147465346b0b8fa8589c88b5851f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 6 Nov 2009 14:56:06 -0200 Subject: [PATCH] Release Devise 0.4.2 with latest fixes. --- CHANGELOG.rdoc | 3 +++ lib/devise/mapping.rb | 3 +++ lib/devise/rails/routes.rb | 1 + lib/devise/version.rb | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index 712e140f..0eb7f610 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -1,3 +1,5 @@ +== 0.4.2 + * deprecations * Renamed mail_sender to mailer_sender @@ -5,6 +7,7 @@ * skip_before_filter added in Devise controllers * Use home_or_root_path on require_no_authentication as well * Added devise_controller?, useful to select or reject filters in ApplicationController + * Allow :path_prefix to be given to devise_for (:path_prefix => "/:locale" is supported) == 0.4.1 diff --git a/lib/devise/mapping.rb b/lib/devise/mapping.rb index 9a6083b4..7d13f811 100644 --- a/lib/devise/mapping.rb +++ b/lib/devise/mapping.rb @@ -78,6 +78,9 @@ module Devise # Returns the parsed path. If you need meta information in your path_prefix, # you should overwrite this method to use it. The only information supported # by default is I18n.locale. + # + # TODO This is a hack. Setting default_url_options that are shared by + # controllers and devise seems to be the best solution. def parsed_path raw_path.gsub(":locale", I18n.locale.to_s) end diff --git a/lib/devise/rails/routes.rb b/lib/devise/rails/routes.rb index eb5dc06f..50671c19 100644 --- a/lib/devise/rails/routes.rb +++ b/lib/devise/rails/routes.rb @@ -64,6 +64,7 @@ module ActionController::Routing # # map.devise_for :users, :path_prefix => "/:locale" # + # When setting a dynamic path prefix, be sure to set default_url_options with the locale on your ApplicationController as well. def devise_for(*resources) options = resources.extract_options! diff --git a/lib/devise/version.rb b/lib/devise/version.rb index 264c4830..0b2aad4f 100644 --- a/lib/devise/version.rb +++ b/lib/devise/version.rb @@ -1,3 +1,3 @@ module Devise - VERSION = "0.4.1".freeze + VERSION = "0.4.2".freeze end