diff --git a/lib/alchemy-pg_search.rb b/lib/alchemy-pg_search.rb index bfee160..61fbc5d 100644 --- a/lib/alchemy-pg_search.rb +++ b/lib/alchemy-pg_search.rb @@ -8,6 +8,7 @@ module Alchemy mattr_accessor :searchable_ingredients @@searchable_ingredients = { "Alchemy::Ingredients::Text": :value, + "Alchemy::Ingredients::Headline": :value, "Alchemy::Ingredients::Richtext": :stripped_body, "Alchemy::Ingredients::Picture": :caption, } diff --git a/spec/models/ingredient_spec.rb b/spec/models/ingredient_spec.rb index a51f13b..0921c4a 100644 --- a/spec/models/ingredient_spec.rb +++ b/spec/models/ingredient_spec.rb @@ -66,6 +66,13 @@ it_behaves_like "a searchable content" end + describe Alchemy::Ingredients::Headline do + let(:ingredient) { create(:alchemy_ingredient_headline, value: "foo bar", element: element) } + + it_behaves_like "it is searchable", field: :value + it_behaves_like "a searchable content" + end + describe Alchemy::Ingredients::Richtext do let(:ingredient) { create(:alchemy_ingredient_richtext, value: "foo bar", element: element) }