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

Version Path
activeldap-1.2.2 examples/al-admin/vendor/locale_rails/sample/app/controllers/samples_controller.rb
locale_rails-2.0.5 sample/app/controllers/samples_controller.rb
locale_rails-0.1.0 sample/app/controllers/samples_controller.rb
locale_rails-2.0.1 sample/app/controllers/samples_controller.rb
locale_rails-2.0.4 sample/app/controllers/samples_controller.rb
locale_rails-2.0.3 sample/app/controllers/samples_controller.rb
locale_rails-2.0.2 sample/app/controllers/samples_controller.rb
locale_rails-2.0.0 sample/app/controllers/samples_controller.rb