adds view placeholders for officing polls
This commit is contained in:
18
app/controllers/officing/base_controller.rb
Normal file
18
app/controllers/officing/base_controller.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
class Officing::BaseController < ActionController::Base
|
||||
layout 'admin'
|
||||
|
||||
#before_action :verify_officer
|
||||
before_action :set_locale
|
||||
|
||||
private
|
||||
|
||||
def set_locale
|
||||
if params[:locale] && I18n.available_locales.include?(params[:locale].to_sym)
|
||||
session[:locale] = params[:locale]
|
||||
end
|
||||
|
||||
session[:locale] ||= I18n.default_locale
|
||||
|
||||
I18n.locale = session[:locale]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user