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.29.1 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.28.4 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.9 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.29.0 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.28.3 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.8 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.29.0.rc4 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.29.0.rc3 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.29.0.rc2 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.29.0.rc1 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.28.2 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.7 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.28.1 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.6 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.10 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.26.9 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.28.0 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.27.5 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.28.0.rc5 app/controllers/decidim/sortitions/admin/application_controller.rb
decidim-sortitions-0.28.0.rc4 app/controllers/decidim/sortitions/admin/application_controller.rb