<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -154,7 +154,7 @@ After signing in a user, confirming it's account or updating it's password, devi
 You also need to setup default url options for the mailer, if you are using confirmable or recoverable. Here's is the configuration for development:
 
   DeviseMailer.sender = &quot;no-reply@yourapp.com&quot;
-  ActionMailer::Base.default_url_options = { :host =&gt; 'localhost:3000' }
+  config.action_mailer.default_url_options = { :host =&gt; 'localhost:3000' }
 
 == Tidying up
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -7,12 +7,13 @@ Some setup you must do manually if you haven't yet:
 
     config.action_mailer.default_url_options = { :host =&gt; 'localhost:3000' }
 
-It's a Rails required configuration.
-In production it must be the actual host your application is deployed to.
+It's a Rails required configuration. In production it must be the actual host your application is deployed to.
 
-2. Setup default sender for mails.In config/environment.rb:
+2. Setup default sender for mails. In config/environment.rb:
 
-    Notifier.sender = &quot;test@example.com&quot;
+    DeviseMailer.sender = &quot;test@example.com&quot;
+
+You can also configure this value by running script/generate devise_install and setting config.mailer_sender,
 
 3. Ensure you have defined root_url to *something* in your config/routes.rb:
 </diff>
      <filename>generators/devise/templates/README</filename>
    </modified>
    <modified>
      <diff>@@ -16,13 +16,13 @@ Devise.setup do |config|
   # config.remember_for = 2.weeks
 
   # Configure the e-mail address which will be shown in DeviseMailer.
-  # config.mail_sender = &quot;foo.bar@yourapp.com&quot;
+  # config.mailer_sender = &quot;foo.bar@yourapp.com&quot;
 
   # 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
   # allows you to setup OAuth, using http://github.com/roman/warden_oauth
   #
-  # config.manager do |manager|
+  # config.warden do |manager|
   #   manager.oauth(:twitter) do |twitter|
   #     twitter.consumer_secret = &lt;YOUR CONSUMER SECRET&gt;
   #     twitter.consumer_key  = &lt;YOUR CONSUMER KEY&gt;</diff>
      <filename>generators/devise_install/templates/devise.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,11 +31,16 @@ module Devise
       yield self
     end
 
+    def mail_sender=(value) #:nodoc:
+      ActiveSupport::Deprecation.warn &quot;Devise.mail_sender= is deprecated, use Devise.mailer_sender instead&quot;
+      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.</diff>
      <filename>lib/devise.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module Devise
 
       def self.included(base)
         base.class_eval do
-          helper_method :warden, :signed_in?,
+          helper_method :warden, :signed_in?, :devise_controller?,
                         *Devise.mappings.keys.map { |m| [:&quot;current_#{m}&quot;, :&quot;#{m}_signed_in?&quot;] }.flatten
         end
       end
@@ -16,6 +16,15 @@ module Devise
         request.env['warden']
       end
 
+      # Return true if it's a devise_controller. false to all controllers unless
+      # the controllers defined inside devise. Useful if you want to apply a before
+      # filter to all controller, except the ones in devise:
+      #
+      #   before_filter :my_filter, :unless =&gt; { |c| c.devise_controller? }
+      def devise_controller?
+        false
+      end
+
       # Attempts to authenticate the given scope by running authentication hooks,
       # but does not redirect in case of failures.
       def authenticate(scope)</diff>
      <filename>lib/devise/controllers/filters.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,9 +7,10 @@ module Devise
 
       def self.included(base)
         base.class_eval do
-          helper_method :resource, :resource_name, :resource_class, :devise_mapping
-          hide_action   :resource, :resource_name, :resource_class, :devise_mapping
+          helper_method :resource, :resource_name, :resource_class, :devise_mapping, :devise_controller?
+          hide_action   :resource, :resource_name, :resource_class, :devise_mapping, :devise_controller?
 
+          skip_before_filter *Devise.mappings.keys.map { |m| :&quot;authenticate_#{m}!&quot; }
           before_filter :is_devise_resource?
         end
       end
@@ -34,6 +35,11 @@ module Devise
         @devise_mapping ||= Devise::Mapping.find_by_path(request.path)
       end
 
+      # Overwrites devise_controller? to return true
+      def devise_controller?
+        true
+      end
+
     protected
 
       # Redirects to stored uri before signing in or the default path and clear
@@ -91,7 +97,7 @@ module Devise
       # Example:
       #   before_filter :require_no_authentication, :only =&gt; :new
       def require_no_authentication
-        redirect_to root_path if warden.authenticated?(resource_name)
+        redirect_to home_or_root_path if warden.authenticated?(resource_name)
       end
 
       # Sets the flash message with :key, using I18n. By default you are able</diff>
      <filename>lib/devise/controllers/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -87,4 +87,8 @@ class ControllerAuthenticableTest &lt; ActionController::TestCase
     @mock_warden.expects(:set_user).with(user = mock, :scope =&gt; :user).returns(true)
     @controller.sign_in(:user, user)
   end
+
+  test 'is not a devise controller' do
+    assert_not @controller.devise_controller?
+  end
 end</diff>
      <filename>test/controllers/filters_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,9 +43,13 @@ class HelpersTest &lt; ActionController::TestCase
   end
 
   test 'require no authentication tests current mapping' do
-    @controller.expects(:resource_name).returns(:user)
+    @controller.expects(:resource_name).returns(:user).twice
     @mock_warden.expects(:authenticated?).with(:user).returns(true)
     @controller.expects(:redirect_to).with(root_path)
     @controller.send :require_no_authentication
   end
+  
+  test 'is a devise controller' do
+    assert @controller.devise_controller?
+  end
 end</diff>
      <filename>test/controllers/helpers_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ class DeviseTest &lt; ActiveSupport::TestCase
   test 'DeviseMailer.sender can be configured through Devise' do
     swap DeviseMailer, :sender =&gt; &quot;foo@bar&quot; do
       assert_equal &quot;foo@bar&quot;, DeviseMailer.sender
-      Devise.mail_sender = &quot;bar@foo&quot;
+      Devise.mailer_sender = &quot;bar@foo&quot;
       assert_equal &quot;bar@foo&quot;, DeviseMailer.sender
     end
   end</diff>
      <filename>test/devise_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -114,7 +114,7 @@ class AuthenticationTest &lt; ActionController::IntegrationTest
     get new_admin_session_path
 
     assert_response :redirect
-    assert_redirected_to root_path
+    assert_redirected_to admin_root_path
     assert warden.authenticated?(:admin)
   end
 </diff>
      <filename>test/integration/authenticatable_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4debe4080b9d61532b5db57c205863ec4d4a81b8</id>
    </parent>
    <parent>
      <id>0c088a7420634291d0115bd12fb1d427e89899c7</id>
    </parent>
  </parents>
  <author>
    <name>Jos&#233; Valim</name>
    <email>jose.valim@gmail.com</email>
  </author>
  <url>http://github.com/plataformatec/devise/commit/c06d9ad7ae270c45217049e66618326c548b56f9</url>
  <id>c06d9ad7ae270c45217049e66618326c548b56f9</id>
  <committed-date>2009-11-06T08:29:44-08:00</committed-date>
  <authored-date>2009-11-06T08:29:44-08:00</authored-date>
  <message>Merge branch 'master' of git@github.com:plataformatec/devise</message>
  <tree>b9a19cd136f3297edc441d057ed558c4295c8bba</tree>
  <committer>
    <name>Jos&#233; Valim</name>
    <email>jose.valim@gmail.com</email>
  </committer>
</commit>
