Sha256: 44215799a6cc04a99e5edda91f03860e0b93c98b2c4cd360d95ef4031467f563

Contents?: true

Size: 793 Bytes

Versions: 4

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Meetings
    module Admin
      # This controller is the abstract class from which all other controllers of
      # this engine inherit.
      #
      # Note that it inherits from `Decidim::Components::BaseController`, which
      # override its layout and provide all kinds of useful methods.
      class ApplicationController < Decidim::Admin::Components::BaseController
        helper Decidim::ApplicationHelper
        helper_method :meetings, :meeting

        def meetings
          @meetings ||= Meeting.where(component: current_component).order(start_time: :desc).page(params[:page]).per(15)
        end

        def meeting
          @meeting ||= meetings.find(params[:id]) if params[:id]
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-meetings-0.24.3 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.24.2 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.24.1 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.24.0 app/controllers/decidim/meetings/admin/application_controller.rb