开发者

Flash messages not working for Rails3 + Haml + RefineryCMS + Devise

开发者 https://www.devze.com 2023-02-04 09:46 出处:网络
I\'m unable to use flash in my haml and erb views. I can however use session[:flash], except in one case开发者_运维百科: after an unsuccessful login with devise, I want to show flash[:alert] or even s

I'm unable to use flash in my haml and erb views. I can however use session[:flash], except in one case开发者_运维百科: after an unsuccessful login with devise, I want to show flash[:alert] or even session[:flash][:alert], but neither work. Both return nil and my page explodes. I can see in the session dump that flash[:alert] is set by devise. Why in the world can't I access it? I'm using Rails3 + Haml + RefineryCMS + Devise. Thanks!


It is possible RefineryCMS is already outputting the flash before you are trying to access it and therefore Rails is removing it?

0

精彩评论

暂无评论...
验证码 换一张
取 消