Skip to content

Commit

Permalink
Merge pull request #84 from AlchemyCMS/remove-element-from-ingredient
Browse files Browse the repository at this point in the history
Remove element from IngredientSerializer
  • Loading branch information
tvdeyen authored Sep 10, 2024
2 parents 2a9dac4 + 606acc1 commit f73af14
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
alchemy_branch:
- 7.0-stable
- 7.1-stable
- 7.2-stable
- main
ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
Expand Down
2 changes: 0 additions & 2 deletions lib/alchemy/json_api/ingredient_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ module Alchemy
module JsonApi
module IngredientSerializer
def self.included(klass)
klass.has_one :element, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer

klass.attributes(
:role,
:value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,4 @@
end
end
end

describe "relationships" do
subject { serializer.serializable_hash[:data][:relationships] }

it "has one element" do
expect(subject[:element]).to eq(data: {id: ingredient.element_id.to_s, type: :element})
end
end
end

0 comments on commit f73af14

Please sign in to comment.