2016-03-30 119 views
0

我想更改消息“您需要先登录或注册才能继续。”当我从活动管理面板注销时。我在devise.en.yml中更改了消息,但我只想更改注销。更改默认登录消息

+0

定义定制所需信息的新翻译变量的缺省值更改闪光灯消息。用新变量更新注销消息。 – Bijendra

回答

1

当我想从我通常把它在控制器

# app/admin/devise/sessions.rb 
class ActiveAdmin::Devise::SessionsController 

    # POST /resource/sign_in 
    def create 
    self.resource = warden.authenticate!(auth_options) 
    #set_flash_message!(:notice, :signed_in) 
    flash[:alert] = 'New message here' 
    sign_in(resource_name, resource) 
    yield resource if block_given? 
    respond_with resource, location: after_sign_in_path_for(resource) 
    end 
end