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 CustomFieldEntries < Base |
||||
extend CostQuery::CustomFieldMixin |
||||
class CostQuery::Filter::CustomFieldEntries < Report::Filter::Base |
||||
extend CostQuery::CustomFieldMixin |
||||
|
||||
on_prepare do |
||||
applies_for :label_issue_attributes |
||||
# redmine internals just suck |
||||
case custom_field.field_format |
||||
when 'string', 'text' then use :string_operators |
||||
when 'list' then use :null_operators |
||||
when 'date' then use :time_operators |
||||
when 'int', 'float' then use :integer_operators |
||||
when 'bool' |
||||
@possible_values = [['true', 't'], ['false', 'f']] |
||||
use :null_operators |
||||
else |
||||
fail "cannot handle #{custom_field.field_format.inspect}" |
||||
end |
||||
on_prepare do |
||||
applies_for :label_issue_attributes |
||||
# redmine internals just suck |
||||
case custom_field.field_format |
||||
when 'string', 'text' then use :string_operators |
||||
when 'list' then use :null_operators |
||||
when 'date' then use :time_operators |
||||
when 'int', 'float' then use :integer_operators |
||||
when 'bool' |
||||
@possible_values = [['true', 't'], ['false', 'f']] |
||||
use :null_operators |
||||
else |
||||
fail "cannot handle #{custom_field.field_format.inspect}" |
||||
end |
||||
end |
||||
|
||||
def self.available_values(*) |
||||
@possible_values || custom_field.possible_values |
||||
end |
||||
def self.available_values(*) |
||||
@possible_values || custom_field.possible_values |
||||
end |
||||
end |
||||
|
Loading…
Reference in new issue