app/helpers/decidim/proposals/application_helper.rb in decidim-proposals-0.6.8 vs app/helpers/decidim/proposals/application_helper.rb in decidim-proposals-0.7.0

- old
+ new

@@ -52,8 +52,22 @@ "warning" when "evaluating" "secondary" end end + + def proposal_limit_enabled? + proposal_limit.present? + end + + def proposal_limit + return if feature_settings.proposal_limit.zero? + + feature_settings.proposal_limit + end + + def current_user_proposals + Proposal.where(feature: current_feature, author: current_user) + end end end end