class Presentation::FieldSearch::Field

Attributes

name[R]

the display name of the field.

options[W]
param[R]

the parameter name of the field. note that this is not necessarily the name of a database column or record attribute. it simply needs to be recognized as a “field” by the controller logic.

type[W]

Public Instance Methods

name=(val) click to toggle source
# File lib/presentation/field_search.rb, line 38
def name=(val)
  @name = val.is_a?(Symbol) ? val.to_s.titleize : val
end
options() click to toggle source

extra options for the field.

# File lib/presentation/field_search.rb, line 61
def options
  @options ||= {}
end
param=(val) click to toggle source
# File lib/presentation/field_search.rb, line 45
def param=(val)
  self.name ||= val
  @param = val.to_s.underscore.downcase.gsub(' ', '_')
end
type() click to toggle source

the type of search interface for this field. supported options:

  • :text (default)

  • :checkbox

  • :time [planned]

  • :list [planned]

# File lib/presentation/field_search.rb, line 55
def type
  @type ||= :text
end