adds filters: by geozone and without_admin

This commit is contained in:
Juanjo Bazán
2016-02-25 18:18:40 +01:00
parent e1aff00e5b
commit 0e1e0ce371
8 changed files with 81 additions and 10 deletions

View File

@@ -18,6 +18,8 @@ class SpendingProposal < ActiveRecord::Base
validates :description, length: { maximum: SpendingProposal.description_max_length }
validates :terms_of_service, acceptance: { allow_nil: false }, on: :create
scope :without_admin, -> { where(administrator_id: nil) }
def description
super.try :html_safe
end