Flash[:notice] followed by render

Hi,

Sometimes I see action code like

def my_action
flash[:notice] = “Flash notice”
render
end

It is even in DHH’s new World of Resources slide show page 22. With
this use of flash before render, the user will see the flash for the
next two visible displays. Am I missing something?

Thanks,
Peter

my solution is to add one line
flash[:notice]=nil
in the view that display the message

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs