Common constants of adapters moved to ransack/constants.rb
This commit is contained in:
parent
12e1e4d4f0
commit
903d58840f
|
@ -1,23 +1,6 @@
|
||||||
module Ransack
|
module Ransack
|
||||||
module Constants
|
module Constants
|
||||||
ASC = 'asc'.freeze
|
|
||||||
DESC = 'desc'.freeze
|
|
||||||
ASC_ARROW = '▲'.freeze
|
|
||||||
DESC_ARROW = '▼'.freeze
|
|
||||||
OR = 'or'.freeze
|
|
||||||
AND = 'and'.freeze
|
|
||||||
SORT = 'sort'.freeze
|
|
||||||
SORT_LINK = 'sort_link'.freeze
|
|
||||||
SEARCH = 'search'.freeze
|
|
||||||
DEFAULT_SEARCH_KEY = 'q'.freeze
|
|
||||||
ATTRIBUTE = 'attribute'.freeze
|
|
||||||
DISTINCT = 'DISTINCT '.freeze
|
DISTINCT = 'DISTINCT '.freeze
|
||||||
COMBINATOR = 'combinator'.freeze
|
|
||||||
SPACE = ' '.freeze
|
|
||||||
COMMA_SPACE = ', '.freeze
|
|
||||||
UNDERSCORE = '_'.freeze
|
|
||||||
NON_BREAKING_SPACE = ' '.freeze
|
|
||||||
EMPTY = ''.freeze
|
|
||||||
STRING_JOIN = 'string_join'.freeze
|
STRING_JOIN = 'string_join'.freeze
|
||||||
ASSOCIATION_JOIN = 'association_join'.freeze
|
ASSOCIATION_JOIN = 'association_join'.freeze
|
||||||
STASHED_JOIN = 'stashed_join'.freeze
|
STASHED_JOIN = 'stashed_join'.freeze
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
module Ransack
|
module Ransack
|
||||||
module Constants
|
module Constants
|
||||||
|
ASC = 'asc'.freeze
|
||||||
|
DESC = 'desc'.freeze
|
||||||
|
ASC_ARROW = '▲'.freeze
|
||||||
|
DESC_ARROW = '▼'.freeze
|
||||||
|
OR = 'or'.freeze
|
||||||
|
AND = 'and'.freeze
|
||||||
|
SORT = 'sort'.freeze
|
||||||
|
SORT_LINK = 'sort_link'.freeze
|
||||||
|
SEARCH = 'search'.freeze
|
||||||
|
DEFAULT_SEARCH_KEY = 'q'.freeze
|
||||||
|
ATTRIBUTE = 'attribute'.freeze
|
||||||
|
COMBINATOR = 'combinator'.freeze
|
||||||
|
SPACE = ' '.freeze
|
||||||
|
COMMA_SPACE = ', '.freeze
|
||||||
|
UNDERSCORE = '_'.freeze
|
||||||
|
NON_BREAKING_SPACE = ' '.freeze
|
||||||
|
EMPTY = ''.freeze
|
||||||
|
|
||||||
TRUE_VALUES = [true, 1, '1', 't', 'T', 'true', 'TRUE'].to_set
|
TRUE_VALUES = [true, 1, '1', 't', 'T', 'true', 'TRUE'].to_set
|
||||||
FALSE_VALUES = [false, 0, '0', 'f', 'F', 'false', 'FALSE'].to_set
|
FALSE_VALUES = [false, 0, '0', 'f', 'F', 'false', 'FALSE'].to_set
|
||||||
BOOLEAN_VALUES = TRUE_VALUES + FALSE_VALUES
|
BOOLEAN_VALUES = TRUE_VALUES + FALSE_VALUES
|
||||||
|
|
Loading…
Reference in New Issue