adds spending proposals index to valuation

filters included: valuation_open, valuating, valuation_finished
search by geozone & by valuator
This commit is contained in:
Juanjo Bazán
2016-03-04 17:52:27 +01:00
committed by Juanjo Bazán
parent 0160ed816c
commit ac9eaec9d9
7 changed files with 288 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
module ValuationHelper
def valuator_select_options(valuator=nil)
if valuator.present?
Valuator.where.not(id: valuator.id).order('users.username asc').includes(:user).collect { |v| [ v.name, v.id ] }.prepend([valuator.name, valuator.id])
else
Valuator.all.order('users.username asc').includes(:user).collect { |v| [ v.name, v.id ] }
end
end
end