adds spending proposals index to valuation
filters included: valuation_open, valuating, valuation_finished search by geozone & by valuator
This commit is contained in:
committed by
Juanjo Bazán
parent
0160ed816c
commit
ac9eaec9d9
11
app/helpers/valuation_helper.rb
Normal file
11
app/helpers/valuation_helper.rb
Normal 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
|
||||
Reference in New Issue
Block a user