alchemy-json_api 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 280355f5754df05ef965218bd9a35fb6f83b654dc534b2fce7cc903c47422fc2
4
- data.tar.gz: 8ad2aa010faba09069bddb9d466d602d1dbc5c34ce052d82e96187c7bb2daa7b
3
+ metadata.gz: 1fe4670c3c86dc4038be27367e22edf73b08771a8821897f7ff09155edeeac2b
4
+ data.tar.gz: 6df10ac401188dcc94e927569bc6b9fd1303b19b03a46738e296fd35cdd34619
5
5
  SHA512:
6
- metadata.gz: 80bd161a6f0b2ff1a9f5d393aad8f2d628a6177cf41443d23f0fa8638a66189600a9f43f71e3b7205ca94a9af00b937a0ecf7645e29ea512132a714fe1a4a6bb
7
- data.tar.gz: a71c19f108eff5b51468687ad628173aa32e2e08e0b471c939582f289cea7009690451a7eff0e1a3c2e94724fbd5c52bcd0f4f70a449a80b4d6b3b10ba0a21c3
6
+ metadata.gz: c537c5b7007113d5da441a755e1f138805782223015e50da29fe7c73476abdbd45b760dcb5088ad1ef2e866435d4439602d0ee71f90ce16c250376b948016b0e
7
+ data.tar.gz: '08e1e57a768cbcae7332257f97766175b9bf5b4d8520dd8fa0904d4b296a933154eeb3f0e7d7e0f4ce2dd06641153350d008671cebb3fd072f98d9185c7bb32c'
@@ -12,7 +12,7 @@ module Alchemy
12
12
  )
13
13
  belongs_to :parent_element, record_type: :element, serializer: self
14
14
 
15
- belongs_to :page, record_type: :page, serializer: PageSerializer
15
+ belongs_to :page, record_type: :page, serializer: ::Alchemy::JsonApi::PageSerializer
16
16
 
17
17
  has_many :essences, polymorphic: true do |element|
18
18
  element.contents.map(&:essence)
@@ -10,7 +10,7 @@ module Alchemy
10
10
  essence&.node&.name
11
11
  end
12
12
 
13
- belongs_to :node, record_type: :node, serializer: NodeSerializer
13
+ belongs_to :node, record_type: :node, serializer: ::Alchemy::JsonApi::NodeSerializer
14
14
 
15
15
  with_options if: proc { |essence| essence.node.present? } do
16
16
  attribute :name do |essence|
@@ -18,7 +18,7 @@ module Alchemy
18
18
  essence.page&.url_path
19
19
  end
20
20
 
21
- has_one :page, record_type: :page, serializer: PageSerializer
21
+ has_one :page, record_type: :page, serializer: ::Alchemy::JsonApi::PageSerializer
22
22
  end
23
23
  end
24
24
  end
@@ -10,13 +10,13 @@ module Alchemy
10
10
  :locale,
11
11
  )
12
12
 
13
- has_many :menu_items, record_type: :node, serializer: NodeSerializer, object_method_name: :nodes, id_method_name: :node_ids
13
+ has_many :menu_items, record_type: :node, serializer: ::Alchemy::JsonApi::NodeSerializer, object_method_name: :nodes, id_method_name: :node_ids
14
14
 
15
- has_many :menus, record_type: :node, serializer: NodeSerializer do |language|
15
+ has_many :menus, record_type: :node, serializer: ::Alchemy::JsonApi::NodeSerializer do |language|
16
16
  language.nodes.select { |n| n.parent.nil? }
17
17
  end
18
18
  has_many :pages
19
- has_one :root_page, record_type: :page, serializer: PageSerializer
19
+ has_one :root_page, record_type: :page, serializer: ::Alchemy::JsonApi::PageSerializer
20
20
 
21
21
  with_options if: ->(_, params) { params[:admin] == true } do
22
22
  attribute :created_at
@@ -15,12 +15,12 @@ module Alchemy
15
15
  :updated_at,
16
16
  )
17
17
 
18
- belongs_to :language, record_type: :language, serializer: LanguageSerializer
18
+ belongs_to :language, record_type: :language, serializer: ::Alchemy::JsonApi::LanguageSerializer
19
19
 
20
- has_many :elements, record_type: :element, serializer: ElementSerializer
21
- has_many :fixed_elements, record_type: :element, serializer: ElementSerializer
20
+ has_many :elements, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer
21
+ has_many :fixed_elements, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer
22
22
 
23
- has_many :all_elements, record_type: :element, serializer: ElementSerializer do |page|
23
+ has_many :all_elements, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer do |page|
24
24
  page.all_elements.select { |e| e.public? && !e.trashed? }
25
25
  end
26
26
 
@@ -4,7 +4,7 @@ module Alchemy
4
4
  module EssenceSerializer
5
5
  def self.included(klass)
6
6
  klass.include FastJsonapi::ObjectSerializer
7
- klass.has_one :element, record_type: :element, serializer: ElementSerializer do |essence|
7
+ klass.has_one :element, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer do |essence|
8
8
  essence.content.element
9
9
  end
10
10
  klass.attributes :ingredient
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Alchemy
3
3
  module JsonApi
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.2"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-json_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Meyerhoff