enable filters to know a translation for a given value depending on their available values

pull/6827/head
Philipp Tessenow 14 years ago
parent e5b19210c6
commit b2def1972c
  1. 6
      lib/report/filter/base.rb

@ -116,7 +116,11 @@ class Report::Filter
end
def self.available_values(params = {})
[]
[] #array of [:label_of_value, value]-kind arrays
end
def self.label_for_value(value)
available_values(:reverse_search => true).find{ |v| v.second == value || v.second.to_s == value }
end
def correct_position?

Loading…
Cancel
Save