Permalink
Browse files

Renamed mail_sender to mailer_sender.

  • Loading branch information...
1 parent 1db50de commit 0c088a7420634291d0115bd12fb1d427e89899c7 José Valim committed Nov 6, 2009
Showing with 12 additions and 4 deletions.
  1. +3 −0 CHANGELOG.rdoc
  2. +1 −1 generators/devise_install/templates/devise.rb
  3. +7 −2 lib/devise.rb
  4. +1 −1 test/devise_test.rb
View
@@ -1,3 +1,6 @@
+* deprecations
+ * Renamed mail_sender to mailer_sender
+
* enhancements
* skip_before_filter added in Devise controllers
* Use home_or_root_path on require_no_authentication as well
@@ -16,7 +16,7 @@
# config.remember_for = 2.weeks
# Configure the e-mail address which will be shown in DeviseMailer.
- # config.mail_sender = "foo.bar@yourapp.com"
+ # config.mailer_sender = "foo.bar@yourapp.com"
# If you want to use other strategies, that are not (yet) supported by Devise,
# you can configure them inside the config.warden block. The example below
View
@@ -21,11 +21,16 @@ def setup
yield self
end
+ def mail_sender=(value) #:nodoc:
+ ActiveSupport::Deprecation.warn "Devise.mail_sender= is deprecated, use Devise.mailer_sender instead"
+ DeviseMailer.sender = value
+ end
+
# Sets the sender in DeviseMailer.
- def mail_sender=(value)
+ def mailer_sender=(value)
DeviseMailer.sender = value
end
- alias :sender= :mail_sender=
+ alias :sender= :mailer_sender=
# Sets warden configuration using a block that will be invoked on warden
# initialization.
View
@@ -27,7 +27,7 @@ def default_strategies(*args)
test 'DeviseMailer.sender can be configured through Devise' do
swap DeviseMailer, :sender => "foo@bar" do
assert_equal "foo@bar", DeviseMailer.sender
- Devise.mail_sender = "bar@foo"
+ Devise.mailer_sender = "bar@foo"
assert_equal "bar@foo", DeviseMailer.sender
end
end

0 comments on commit 0c088a7

Please sign in to comment.