Sha256: 2e940b0497732809c28f65f92d45b22177a1fbb08c0de8d79a9dc7882f15b521

Contents?: true

Size: 453 Bytes

Versions: 3

Compression:

Stored size: 453 Bytes

Contents

module Kuhsaft
  module Cms
    class AdminController < ActionController::Base
      inherit_resources
      respond_to :html
      layout 'kuhsaft/cms/application'
      before_filter :set_content_locale

      def set_content_locale
        if params[:content_locale].present?
          I18n.locale = params[:content_locale]
        end
      end

      def url_options
        { content_locale: I18n.locale }.merge(super)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kuhsaft-2.2.1 app/controllers/kuhsaft/cms/admin_controller.rb
kuhsaft-2.2.0 app/controllers/kuhsaft/cms/admin_controller.rb
kuhsaft-2.1.2 app/controllers/kuhsaft/cms/admin_controller.rb