Skip to content

Commit

Permalink
Merge pull request #82 from manleyac/include-restricted-in-page-seria…
Browse files Browse the repository at this point in the history
…lizer

Add restricted value to page serializer
  • Loading branch information
tvdeyen authored Jun 7, 2024
2 parents f38b202 + fdc48df commit f62c4f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/serializers/alchemy/json_api/page_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class PageSerializer < BaseSerializer
:meta_keywords,
:meta_description,
:created_at,
:updated_at
:updated_at,
:restricted
)

cache_options store: Rails.cache, namespace: "alchemy-jsonapi"
Expand Down
1 change: 1 addition & 0 deletions spec/serializers/alchemy/json_api/page_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
expect(attributes[:created_at]).to eq(page.created_at)
expect(attributes[:updated_at]).to eq(page.updated_at)
expect(attributes[:legacy_urls]).to eq(["/other"])
expect(attributes[:restricted]).to be false
expect(attributes.keys).not_to include(:tag_list, :status)
end
end
Expand Down

0 comments on commit f62c4f3

Please sign in to comment.