Module: FullSearch::Model::InstanceMethods
- Defined in:
- lib/full_search/model.rb
Instance Attribute Summary collapse
-
#full_search_highlight_fields ⇒ Object
Returns the value of attribute full_search_highlight_fields.
-
#full_search_snippet ⇒ Object
Returns the value of attribute full_search_snippet.
Instance Method Summary collapse
Instance Attribute Details
#full_search_highlight_fields ⇒ Object
Returns the value of attribute full_search_highlight_fields.
51 52 53 |
# File 'lib/full_search/model.rb', line 51 def full_search_highlight_fields @full_search_highlight_fields end |
#full_search_snippet ⇒ Object
Returns the value of attribute full_search_snippet.
51 52 53 |
# File 'lib/full_search/model.rb', line 51 def full_search_snippet @full_search_snippet end |
Instance Method Details
#full_search_text_for(field_name) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/full_search/model.rb', line 53 def full_search_text_for(field_name) dsl = self.class.full_search_dsl field = dsl.fields.find { |f| f.name == field_name.to_s || f.as == field_name.to_s } return nil unless field field.source ? instance_exec(&field.source) : public_send(field.name) end |