I'm using Sinatra + rack-flash3 gem. I installed it, but in spite of that it throws an exception. Here is a layout.haml
!!!5
%html
%body
.my_div
!= haml :"shared/_flash"
!= yield
and _flash.haml
.my-div2
.flash-notice
- if flash[:notice]
.alert.alert-success
= flash[:notice]
- if flash[:error]
.alert.alert-error
= flash[:error]
- if flash[:info]
.alert.alert-info
= flash[:info]
The error is
undefined local variable or method `flash' for #<App:0x00000004226c90>
file: _flash.haml location: evaluate_source line: 3
I wonder why is this happening?