Sha256: 33cfadef19f85a5684d5eeffdc28d75ff8f18d6b246b09e90989962d4c1f2ce0
Contents?: true
Size: 609 Bytes
Versions: 16
Compression:
Stored size: 609 Bytes
Contents
# frozen_string_literal: true module Decidim module Plans module CellsHelper def plans_controller? context[:controller].class.to_s == "Decidim::Plans::PlansController" end def withdrawable? return unless from_context return unless plans_controller? return if index_action? from_context.withdrawable_by?(current_user) end def flagable? return unless from_context return unless plans_controller? return if index_action? return if from_context.try(:official?) true end end end end
Version data entries
16 entries across 16 versions & 1 rubygems