遇到过滤链停止为:当iam尝试重置密码时,使用rails 4呈现或重定向require_no_authentication

时间:2015-01-20 13:51:38

标签: ruby-on-rails-4.2

 this is my home_controller.rb
    class HomeController < ApplicationController
      def index
      end
    end





    my routes.rb file
    devise_for :users ,:controllers => {:sessions => "users/sessions"}

            devise_scope :user do
            root :to =>"users/sessions#new"
            end




my development.rb file
 config.action_mailer.default_url_options = { :host => 'localhost:3000' }
  config.action_mailer.delivery_method = :smtp
  config.cache_classes = false

      config.action_mailer.smtp_settings = {
      address: "smtp.gmail.com",
      port: 587,
      user_name:"ajeet.soni10@gmail.com",
      password: "6473eyre",
      authentication: "plain",
      enable_starttls_auto: true,

    }`

` 所以iam使用url: - http://localhost:3000//signin它向我显示登录页面用户通常可以单击,但是当用户想重置他的密码时 通过单击忘记密码,整个页面将通过重定向循环暂停

1 个答案:

答案 0 :(得分:0)

在routes.rb文件中出现问题我纠正了该文件并且有效

登录:: Application.routes.draw做

  resources :pets


#devise_for :users

devise_for:users,:controllers =&gt; {:sessions =&gt; &#34;用户/会话&#34;}         devise_scope:用户做         root:to =&gt;&#34; users / sessions#new&#34;         端