Skip to content
Max Ivak edited this page Jul 1, 2015 · 2 revisions

Field options

field :name, ..

  • default_value:

  • ignore_value:

  • conditions:

  • condition: condition type used for building SQL query. Types like 'equal', 'like', etc.
  • condition_scope: used if condition==:custom. scope defined in model.
  • condition_where: used if condition==:custom. where condition defined as string like 'parent_id = ?'.

condition types (values for :condition option):

  • :empty - the field is skipped in search
  • :equal
  • :like - condition in where will be "like 'value' "
  • :like_full - "like '%value%' "
  • :like_left - "like 'value%' "
  • :like_right - :like_full - "like 'value%' "
  • :custom - condition_scope or condition_where options will be used for building a condition
Clone this wiki locally