Ruby On Rails Interview Questions and Answers
Ques. What is Flash in Ruby on Rails?Ans.
Flash is simply a way to pass some value to the next action.
Anything you place in the flash will be exposed to the very next action and then cleared out.
Here’s an example:
Then wherever you want to use the flash you can write this code. I often put this snippet in the application.html.erb file, somewhere towards the top:
<% if !flash[:notice].blank? %>
Most helpful rated by users: