Class: Ransack::Name

Inherits:
String
  • Object
show all
Defined in:
lib/ransack/naming.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeName


30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/ransack/naming.rb', line 30

def initialize
  super(Constants::CAP_SEARCH)
  @singular     = Constants::SEARCH
  @plural       = Constants::SEARCHES
  @element      = Constants::SEARCH
  @human        = Constants::CAP_SEARCH
  @collection   = Constants::RANSACK_SLASH_SEARCHES
  @partial_path = Constants::RANSACK_SLASH_SEARCHES_SLASH_SEARCH
  @param_key    = Constants::Q
  @route_key    = Constants::SEARCHES
  @i18n_key     = :ransack
end

Instance Attribute Details

#collectionObject (readonly) Also known as: cache_key

Returns the value of attribute collection


26
27
28
# File 'lib/ransack/naming.rb', line 26

def collection
  @collection
end

#elementObject (readonly)

Returns the value of attribute element


26
27
28
# File 'lib/ransack/naming.rb', line 26

def element
  @element
end

#humanObject (readonly)

Returns the value of attribute human


26
27
28
# File 'lib/ransack/naming.rb', line 26

def human
  @human
end

#i18n_keyObject (readonly)

Returns the value of attribute i18n_key


26
27
28
# File 'lib/ransack/naming.rb', line 26

def i18n_key
  @i18n_key
end

#param_keyObject (readonly)

Returns the value of attribute param_key


26
27
28
# File 'lib/ransack/naming.rb', line 26

def param_key
  @param_key
end

#partial_pathObject (readonly)

Returns the value of attribute partial_path


26
27
28
# File 'lib/ransack/naming.rb', line 26

def partial_path
  @partial_path
end

#pluralObject (readonly)

Returns the value of attribute plural


26
27
28
# File 'lib/ransack/naming.rb', line 26

def plural
  @plural
end

#route_keyObject (readonly)

Returns the value of attribute route_key


26
27
28
# File 'lib/ransack/naming.rb', line 26

def route_key
  @route_key
end

#singularObject (readonly)

Returns the value of attribute singular


26
27
28
# File 'lib/ransack/naming.rb', line 26

def singular
  @singular
end