Sha256: fc49a09bd406721410a25434d4f9a3cb5a226be341c9ad7f8bbf3a8ea967a83d
Contents?: true
Size: 721 Bytes
Versions: 3
Compression:
Stored size: 721 Bytes
Contents
class Interpret::BaseController < Interpret.parent_controller.classify.constantize before_filter :set_locale before_filter { authorize! :use, :interpret } before_filter :check_authorized_language layout 'interpret/interpret' helper Interpret::InterpretHelper protected def current_interpret_user send(Interpret.current_user) end def current_ability @current_ability ||= Interpret.ability.new(current_interpret_user) end def default_url_options(options = {}) options.merge({:locale => I18n.locale}) end private def set_locale I18n.locale = params[:locale] if params[:locale] end def check_authorized_language authorize! :use, :"interpret_in_#{I18n.locale}" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
interpret-1.1.2 | app/controllers/interpret/base_controller.rb |
interpret-1.1.1 | app/controllers/interpret/base_controller.rb |
interpret-1.1.0 | app/controllers/interpret/base_controller.rb |