• Java IO
  • Spring
  • SQL Tutorial
  • JSP
  • jQuery
  • PHP
  • Struts
  • RubyonRails
  • Core Java

  • <

    Ruby on Rails session


    A session is just a place to store data during one request that you can read during later requests.

    Example
    session[:user] = @user 
    flash[:message] = "Data was saved successfully" 
    
    <%= link_to "login", :action => 'login' unless session[:user] %> 
    <% if flash[:message] %> 
    <div><%= h flash[:message] %></div> 
    <% end %>
    
















    © copyright 2017-2021 Completedone pvt ltd.