Module: Alchemy::Search::IngredientExtension

Defined in:
app/extensions/alchemy/search/ingredient_extension.rb

Instance Method Summary collapse

Instance Method Details

#searchable?Boolean

Returns:

  • (Boolean)


6
7
8
9
10
# File 'app/extensions/alchemy/search/ingredient_extension.rb', line 6

def searchable?
  Alchemy.searchable_ingredients.has_key?(type.to_sym) &&
    (definition.key?(:searchable) ? definition[:searchable] : true) &&
    !!element&.searchable?
end

#searchable_contentObject



2
3
4
# File 'app/extensions/alchemy/search/ingredient_extension.rb', line 2

def searchable_content
  send(Alchemy.searchable_ingredients[type.to_sym])&.squish
end