Sha256: af26408f8a78b557c7b37d423f7142594ab193aed0c6c98239d3ca7123d77b1a

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

class ApplicationController < ActionController::Base
  
  layout "main"
  
  before_filter :activate_whowish_word, :set_locale
  
  def activate_whowish_word
    if params[:edit_mode] == "yes"
      whowish_word.activate_edit_mode
    end
  end
  
  def set_locale
    if params[:locale]
      session[:locale] = params[:locale]
    end
    
    session[:locale] ||= "en"
    I18n.locale = session[:locale].to_sym
  end
  
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whowish_word-0.4.0 rails/app/controllers/application_controller.rb