Sha256: 65d27f6dc0b591a45d4fbf3d84e552822140ee5d8b6b5d465abc22f3683d1d41
Contents?: true
Size: 635 Bytes
Versions: 3
Compression:
Stored size: 635 Bytes
Contents
module Comatose class ApplicationController < ActionController::Base before_filter :set_locale def comatose_current_user @_current_user end def set_locale locale_language, locale_country = params[:locale].to_s.split('-') locale_language ||= 'en' locale_country ||= 'US' locale_language.downcase! locale_country.upcase! I18n.locale = "#{locale_language}-#{locale_country}" logger.debug "Locale set to #{I18n.locale} from param #{params[:locale]}" end def find_page(*args) Comatose::Page.send(Comatose.config.page_finder, *args) end end end
Version data entries
3 entries across 3 versions & 1 rubygems