English 中文(简体)
取消签字信号闪电信号
原标题:Remove Devise Flash Notices for Sign out

As the name says, I am using devise for user auth in a rails 3 app Upon user log out, there is a flash notice, "User Successfully signed out" that I don t want to appear. However, I can t figure out how to remove the notice.

是否有办法绕过它? 我要完全删除通知,以便最好不要有通知的四分之四。

最佳回答

如果你在你的地方档案中明确为此设置了空白处,那么就把“双手”变成了空洞的电文(例如,打得的甚至是空洞的超正文)。

#en.yml
devise:
    sessions:
        signed_in:  Signed in successfully. 
        signed_out:   
问题回答

My routes.rb

devise_for :users, :controllers => {
  sessions:  user/sessions 
}

My controller “account/sessions_ Controller.rb”

class User::SessionsController < Devise::SessionsController

  def destroy
    super
    flash.delete(:notice)
  end

end




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Remotely authenticating client Windows user on demand

Suppose I am writing a server for a particular network protocol. If I know that the client is running on a Windows machine, is it possible for my server to authenticate the Windows user that owns the ...

Role/Permission based forms authorizing/authentication?

While looking into forms authorizing/authentication, I found that it is possible to do role based authorizing by adding an array of roles to a FormsAuthenticationTicket. That way I can write User....

热门标签