Sha256: dbc6eda5663ee857fd58cf242bc71ead28d98a7730865b937b467e0706b8ed32

Contents?: true

Size: 552 Bytes

Versions: 2

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Calendar
    module Admin
      class ApplicationController < Decidim::Admin::ApplicationController
        helper_method :events, :event

        def events
          @events ||= Calendar::ExternalEvent.where(organization: current_organization).page(params[:page]).per(15)
        end

        def event
          @event ||= events.find(params[:id])
        end

        def permission_class_chain
          [Decidim::Calendar::Admin::Permissions] + super
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decidim-calendar-0.19.0 app/controllers/decidim/calendar/admin/application_controller.rb
decidim-calendar-0.13.1.3 app/controllers/decidim/calendar/admin/application_controller.rb