Sha256: 4c8ac5fccd0abee74fc1aeecf5e23af26c9cbeeb227f38d613ca0695fa7c55c8

Contents?: true

Size: 741 Bytes

Versions: 25

Compression:

Stored size: 741 Bytes

Contents

module Optimacms
  module Admin
    class AdminBaseController < ApplicationController
      before_action :authenticate_cms_admin_user!


      layout 'optimacms/admin/layouts/main'

      add_flash_types :success

      helper ApplicationHelper
      helper FormsHelper


      #### modal
      def set_layout_modal_old
        if @modal==1
          self.class.layout false
        end

      end


      ### devise

      def after_sign_in_path_for(resource)
        if resource.is_a?(CmsAdminUser)
          dashboard_path
        else
          root_path
        end

      end


      ### redirects
      def redirect_to_res(res)
        v_res = res ? 1 : 0
        redirect_to res_common_path(res: v_res)
      end

    end

  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
optimacms-0.1.61 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.4.3 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.4.2 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.3.9 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.3.8 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.3.7 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.3.6 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.3.5 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.3.2 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.3.1 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.23 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.22 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.19 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.18 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.17 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.8 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.7 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.6 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.2.5 app/controllers/optimacms/admin/admin_base_controller.rb
optimacms-0.1.60 app/controllers/optimacms/admin/admin_base_controller.rb