Sha256: 16ee8602c19e84262f666b9b838b86cdcdb823e65e70e568e43e0a10cedf3a32

Contents?: true

Size: 512 Bytes

Versions: 14

Compression:

Stored size: 512 Bytes

Contents

class ApplicationController < ActionController::Base
  
  layout "main"
  
  before_filter :activate_whowish_word, :set_locale
  
  def activate_whowish_word
    if params[:edit_mode]
      session[:edit_mode] = params[:edit_mode]
    end

    if session[: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

14 entries across 14 versions & 1 rubygems

Version Path
whowish_word-1.0.0 rails/app/controllers/application_controller.rb
whowish_word-0.6.5 rails/app/controllers/application_controller.rb
whowish_word-0.6.4 rails/app/controllers/application_controller.rb
whowish_word-0.6.3 rails/app/controllers/application_controller.rb
whowish_word-0.6.2 rails/app/controllers/application_controller.rb
whowish_word-0.6.2gem rails/app/controllers/application_controller.rb
whowish_word-0.6.1 rails/app/controllers/application_controller.rb
whowish_word-0.6.0 rails/app/controllers/application_controller.rb
whowish_word-0.5.5 rails/app/controllers/application_controller.rb
whowish_word-0.5.4 rails/app/controllers/application_controller.rb
whowish_word-0.5.3 rails/app/controllers/application_controller.rb
whowish_word-0.5.2 rails/app/controllers/application_controller.rb
whowish_word-0.5.1 rails/app/controllers/application_controller.rb
whowish_word-0.5.0 rails/app/controllers/application_controller.rb