Is it possible to use sessions on html.erb file? If so please can someone explain how to use session variables on html.erb files ?? I have session[:id] on my controller and I need to get that id on my html.erb so how can I do that please give me a solution for this problem. Thanks
Share
Place this in your view:
<%= session[:id] %><%= ... %>will evaluate any statement available to the view_context.The = sign after the % is very important because is evaluating the expression,