Sha256: 40324c3d7d8533a81f1f796320653577ce1d79872ec7d43b0b76fad36ef52f95

Contents?: true

Size: 778 Bytes

Versions: 12

Compression:

Stored size: 778 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("created_at DESC").page(params[:page]).per(15)
        end

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
decidim-meetings-0.22.0 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.21.0 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.20.1 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.20.0 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.19.1 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.18.1 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.19.0 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.17.2 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.18.0 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.17.1 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.16.1 app/controllers/decidim/meetings/admin/application_controller.rb
decidim-meetings-0.17.0 app/controllers/decidim/meetings/admin/application_controller.rb