Sha256: f568e4e3726c9b86c811fc4d1836a371616301a23f2a6da075d3409a1fd5e98d

Contents?: true

Size: 911 Bytes

Versions: 88

Compression:

Stored size: 911 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Sortitions
    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_method :sortitions, :sortition

        def sortitions
          @sortitions ||= Decidim::Sortitions::FilteredSortitions
                          .for(current_component)
                          .order(created_at: :desc)
                          .page(params[:page])
                          .per(Decidim::Sortitions.items_per_page)
        end

        def sortition
          @sortition ||= sortitions.find(params[:id])
        end
      end
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
decidim-sortitions-0.26.8 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.4 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.3 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.7 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.5 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.2 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.1 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.4 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.0 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.3 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.0.rc2 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.0.rc1 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.2 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.1 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.0 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.0.rc2 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.0.rc1 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.25.2 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.25.1 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.25.0 app/controllers/decidim/sortitions/admin/application_controller.rb