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 +4 -4
- data/app/serializers/alchemy/json_api/element_serializer.rb +1 -1
- data/app/serializers/alchemy/json_api/essence_node_serializer.rb +1 -1
- data/app/serializers/alchemy/json_api/essence_page_serializer.rb +1 -1
- data/app/serializers/alchemy/json_api/language_serializer.rb +3 -3
- data/app/serializers/alchemy/json_api/page_serializer.rb +4 -4
- data/lib/alchemy/json_api/essence_serializer.rb +1 -1
- data/lib/alchemy/json_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fe4670c3c86dc4038be27367e22edf73b08771a8821897f7ff09155edeeac2b
|
4
|
+
data.tar.gz: 6df10ac401188dcc94e927569bc6b9fd1303b19b03a46738e296fd35cdd34619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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|
|
@@ -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
|