Sha256: 6e503b13bbf70094276563a84f148e781cc204de9c2fd29964bee17f54a69b5f
Contents?: true
Size: 587 Bytes
Versions: 8
Compression:
Stored size: 587 Bytes
Contents
class SamplesController < ApplicationController caches_action :cached_action def index end def set_cookie flash[:notice] = "Cookie lang value is: " + params[:id] cookies["lang"] = params[:id] respond_to do |format| format.html { redirect_to :action => "index" } end end def clear_cookie cookies["lang"] = nil flash[:notice] = "Cookie lang value is cleared. " respond_to do |format| format.html { redirect_to :action => "index" } end end def cached_action p "cached_action. This is shown first time only." end end
Version data entries
8 entries across 8 versions & 2 rubygems