Module: Decidim::Plans::CellsHelper
- Included in:
- AuthorCell, CollapsibleAuthorsCell
- Defined in:
- app/helpers/decidim/plans/cells_helper.rb
Instance Method Summary collapse
Instance Method Details
#flagable? ⇒ Boolean
17 18 19 20 21 22 23 |
# File 'app/helpers/decidim/plans/cells_helper.rb', line 17 def flagable? return unless from_context return unless plans_controller? return if index_action? return if from_context.try(:official?) true end |
#plans_controller? ⇒ Boolean
6 7 8 |
# File 'app/helpers/decidim/plans/cells_helper.rb', line 6 def plans_controller? context[:controller].class.to_s == "Decidim::Plans::PlansController" end |
#withdrawable? ⇒ Boolean
10 11 12 13 14 15 |
# File 'app/helpers/decidim/plans/cells_helper.rb', line 10 def withdrawable? return unless from_context return unless plans_controller? return if index_action? from_context.withdrawable_by?(current_user) end |