Better cmtool integration

This commit is contained in:
2015-02-25 12:54:07 +01:00
parent 6a47ecb0eb
commit fd9afb9d53
15 changed files with 110 additions and 72 deletions
+6 -1
View File
@@ -25,6 +25,10 @@ private
redirect_to '/', alert: t('general.unauthorized') unless current_user.present? && current_user.admin?
end
def cmtool_locale
:en
end
def broadcast_user(uid, event, data = {})
Qwaiter.broadcast_user uid, event, data
end
@@ -34,7 +38,8 @@ private
end
def set_locale
I18n.locale = (params[:locale].presence || I18n.default_locale).to_sym
#session[:locale] = (params[:locale].presence || session[:locale] || Rails.configuration.i18n.default_locale).to_sym
I18n.locale = params[:locale].presence.try(:to_sym) || Rails.configuration.i18n.default_locale
end
def _render_with_renderer_json(resource, options)