Sha256: 1017cf575402be662e6d127fd3b062f871474fde5abcccb1dad0b9272b969de9

Contents?: true

Size: 774 Bytes

Versions: 3

Compression:

Stored size: 774 Bytes

Contents

module IshManager
  class ApplicationController < ActionController::Base
    protect_from_forgery :with => :exception
    before_action :set_current_ability
    check_authorization

    def home
      authorize! :home, Manager
      render 'home'
    end

    private

    def set_current_ability
      @current_ability ||= ::IshManager::Ability.new( current_user )
    end

    def set_lists
      @sites_list = Site.all.list
      @cities_list = City.all.list
      @venues_list = Venue.all.list
      @reports_list = Report.all.list
      @galleries_list = Gallery.all.list
      @videos_list = Video.all.list
      @user_profiles_list = IshModels::UserProfile.all.list
      @tags_list = Tag.list
    end

    private

    def pp_errors err
      err
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ish_manager-0.1.8.50 app/controllers/ish_manager/application_controller.rb
ish_manager-0.1.8.49 app/controllers/ish_manager/application_controller.rb
ish_manager-0.1.8.47 app/controllers/ish_manager/application_controller.rb