Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove element from IngredientSerializer #84

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading