ruby - Rails 3. the "flash" doesn't work on some pages -


i'm using "web_app_theme" gem. problem flash error , warning messages don't work.

for example, in sign in page work; in forgot password page doesn't work. tested displaying contents of flash <%= debug flash %>.

this in sign in page...

!ruby/object:actiondispatch::flash::flashhash           used: !ruby/object:set             hash:               :alert: true           closed: false           flashes:             :alert: invalid email or password.           now: !ruby/object:actiondispatch::flash::flashnow 

but in forgot password page get...

!ruby/object:actiondispatch::flash::flashhash     used: !ruby/object:set       hash: {}     closed: false     flashes: {}     now: !ruby/object:actiondispatch::flash::flashnow 

i'm thinking might related not using haml. in sign in page i'm using haml in forgot password page i'm using erb. i'm confused because contents of 'flash' should same regardless of format, right?

this has little view code use.

from question, it's clear flash in forgot password page has not been set. either or has been set , erased. using haml or erb not relevant since rails flash present in both pages.

check controller code same , verify should in flash on page.

also, while there no hard , fast rule, strongly advised use 1 template / view engine (erb or haml) in single application.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -