在创建新的Admin时,我得到消息"Admin已成功创建“。
但我得推翻这一点。为此我做了:/app/admin/admin.rb
controller do
def create
super do
redirect_to admin_admins_path, notice: 'My custom message' and return
end
end
end这是目前的目的,但是我想知道消息是如何产生的?。
我搜索了这个问题中所有的YMLs,也搜索了所有的活动管理宝石,但是都是徒劳的!
谢谢
发布于 2015-12-02 14:10:21
您要查找的代码并不完全位于activeadmin gem中。来自BaseController的activeadmin继承了inherited_resources gem的InheritedResources::Base,后者又使用了现在在responders gem中的respond_with (前) Rails函数。所以,如果你想准确地看一下闪存信息是如何设置的,你就必须遵循创业板轨迹。
https://stackoverflow.com/questions/34044139
复制相似问题