Class: QueryCustomFieldColumn

Inherits:
QueryColumn show all
Defined in:
app/models/query.rb

Instance Attribute Summary

Attributes inherited from QueryColumn

#default_order, #name, #sortable

Instance Method Summary (collapse)

Methods inherited from QueryColumn

#sortable?

Methods included from Redmine::I18n

#current_language, #day_name, #find_language, #format_date, #format_time, included, #l, #l_hours, #l_or_humanize, #ll, #month_name, #set_language_if_valid, #valid_languages

Constructor Details

- (QueryCustomFieldColumn) initialize(custom_field)

Returns a new instance of QueryCustomFieldColumn



40
41
42
43
44
# File 'app/models/query.rb', line 40

def initialize(custom_field)
  self.name = "cf_#{custom_field.id}".to_sym
  self.sortable = custom_field.order_statement || false
  @cf = custom_field
end

Instance Method Details

- (Object) caption



46
47
48
# File 'app/models/query.rb', line 46

def caption
  @cf.name
end

- (Object) custom_field



50
51
52
# File 'app/models/query.rb', line 50

def custom_field
  @cf
end