Merge pull request #27 from finnlabs/feature/rails3_fix_development_classloading
Fixed uninitialized constant exception in developmentpull/6827/head
commit
7355abac66
@ -1,25 +1,23 @@ |
|||||||
class CostQuery::Filter |
class CostQuery::Filter::CustomFieldEntries < Report::Filter::Base |
||||||
class CustomFieldEntries < Base |
extend CostQuery::CustomFieldMixin |
||||||
extend CostQuery::CustomFieldMixin |
|
||||||
|
|
||||||
on_prepare do |
on_prepare do |
||||||
applies_for :label_issue_attributes |
applies_for :label_issue_attributes |
||||||
# redmine internals just suck |
# redmine internals just suck |
||||||
case custom_field.field_format |
case custom_field.field_format |
||||||
when 'string', 'text' then use :string_operators |
when 'string', 'text' then use :string_operators |
||||||
when 'list' then use :null_operators |
when 'list' then use :null_operators |
||||||
when 'date' then use :time_operators |
when 'date' then use :time_operators |
||||||
when 'int', 'float' then use :integer_operators |
when 'int', 'float' then use :integer_operators |
||||||
when 'bool' |
when 'bool' |
||||||
@possible_values = [['true', 't'], ['false', 'f']] |
@possible_values = [['true', 't'], ['false', 'f']] |
||||||
use :null_operators |
use :null_operators |
||||||
else |
else |
||||||
fail "cannot handle #{custom_field.field_format.inspect}" |
fail "cannot handle #{custom_field.field_format.inspect}" |
||||||
end |
|
||||||
end |
end |
||||||
|
end |
||||||
|
|
||||||
def self.available_values(*) |
def self.available_values(*) |
||||||
@possible_values || custom_field.possible_values |
@possible_values || custom_field.possible_values |
||||||
end |
|
||||||
end |
end |
||||||
end |
end |
||||||
|
Loading…
Reference in new issue