alchemy-json_api 0.10.0 → 0.10.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 566f8ea63b33d368120cc948fa2c61b4b0039957249e85718f650e8e7ca8d322
|
4
|
+
data.tar.gz: 6816b1a2b645b9711a77bd8916814cd245b319e8144c6de278ec3f780c03f36f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6041f03d5b9264d25312b7e4e1e50d9e5aae32154a47d8e8178bf7ab1dbd5362127e683d40ecba95f1fd05bb1d503afb6444286a97e99bcf5514fa4d48ade95c
|
7
|
+
data.tar.gz: 5355f10ab5dc5ae2ff7b2fb9412358467e4d351c23efbb37e8a9fbe6e300e6848d6e2b3a01c58fae8d1fbf8df00749835d55b65c43b2705dfcf2431281ef6a8a
|
@@ -19,7 +19,9 @@ module Alchemy
|
|
19
19
|
element.contents.reject { |c| !!c.try(:deprecated?) }.map!(&:essence)
|
20
20
|
end
|
21
21
|
|
22
|
-
has_many :nested_elements, record_type: :element, serializer: self
|
22
|
+
has_many :nested_elements, record_type: :element, serializer: self do |element|
|
23
|
+
element.nested_elements.reject { |c| !!c.try(:deprecated?) }
|
24
|
+
end
|
23
25
|
|
24
26
|
with_options if: ->(_, params) { params[:admin] == true } do
|
25
27
|
attribute :tag_list
|
@@ -18,8 +18,13 @@ module Alchemy
|
|
18
18
|
|
19
19
|
belongs_to :language, record_type: :language, serializer: ::Alchemy::JsonApi::LanguageSerializer
|
20
20
|
|
21
|
-
has_many :elements, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer
|
22
|
-
|
21
|
+
has_many :elements, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer do |page|
|
22
|
+
page.elements.reject { |e| !!e.try(:deprecated?) }
|
23
|
+
end
|
24
|
+
|
25
|
+
has_many :fixed_elements, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer do |page|
|
26
|
+
page.fixed_elements.reject { |c| !!c.try(:deprecated?) }
|
27
|
+
end
|
23
28
|
|
24
29
|
has_many :all_elements, record_type: :element, serializer: ::Alchemy::JsonApi::ElementSerializer do |page|
|
25
30
|
page.all_elements.select { |e| e.public? && !e.trashed? && !e.try(:deprecated?) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-json_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Meyerhoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|