Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/acts_as_explorable/ext/string.rb
Overview
A String extension for ActsAsExplorable
Instance Method Summary collapse
-
#to_acts_as_explorable(*keys) ⇒ Hash
Converts the String into a Hash for ActsAsExplorable.
Instance Method Details
#to_acts_as_explorable(*keys) ⇒ Hash
Converts the String into a Hash for ActsAsExplorable.
Returns:
A Hash providing 2 keys:
-
:valuesholds the search text values -
:paramsholds parameters (fields) to search in
20 21 22 23 |
# File 'lib/acts_as_explorable/ext/string.rb', line 20 def to_acts_as_explorable(*keys) return nil if self.blank? ActsAsExplorable::Parser.transform(self, *keys) end |