Sha256: 6cdc9f543da0f91c37e01a626fc055a749f1a162d57755899439aaaf62f61918
Contents?: true
Size: 983 Bytes
Versions: 33
Compression:
Stored size: 983 Bytes
Contents
# frozen_string_literal: true module Decidim module Sortitions # Exposes the sortition resource so users can view them class SortitionsController < Decidim::Sortitions::ApplicationController helper Decidim::WidgetUrlsHelper include FilterResource include Decidim::Sortitions::Orderable include Paginable helper_method :sortition helper Decidim::Proposals::ApplicationHelper def index @sortitions = search .results .includes(:author) .includes(:category) @sortitions = paginate(@sortitions) @sortitions = reorder(@sortitions) end private def sortition Sortition.find(params[:id]) end def search_klass SortitionSearch end def default_filter_params { search_text: "", category_id: "", state: "active" } end end end end
Version data entries
33 entries across 33 versions & 1 rubygems