thecore_print_commons 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/api/print_template.rb +2 -2
- data/app/models/concerns/api/printer.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f0b1b571fa094d8b1b266d24f6ea7ae229c57c2364952dff65355d744da507e
|
4
|
+
data.tar.gz: f96a79855b594b66e390cdfceef995faba318fd47e1975cfbdcc12074efd7005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc9fd513300b2dab275b0702bc6c01ac87edf5a04616f2afc03ecb591e7b3cfddc9a7b93300d9a9445e46e11ef11d2a97cab4763a59ef0a59a7b57deb0e3ced8
|
7
|
+
data.tar.gz: ffdd5c9dd4ac4ca21ee5b25b6fb1278295d451e1c0e2ce51a4091fdb6a99555beb54d67ce29d2a817e9f4ce63a461f6687cbbf7472009306049d77fc1a5e6368
|
@@ -2,7 +2,7 @@ module Api::PrintTemplate
|
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
|
4
4
|
included do
|
5
|
-
# Use
|
5
|
+
# Use self.json_attrs to drive json rendering for
|
6
6
|
# API model responses (index, show and update ones).
|
7
7
|
# For reference:
|
8
8
|
# https://api.rubyonrails.org/classes/ActiveModel/Serializers/JSON.html
|
@@ -12,7 +12,7 @@ module Api::PrintTemplate
|
|
12
12
|
# - methods: include the result of some method defined in the model
|
13
13
|
# - include: include associated models, it's an object {} which also accepts the keys described here
|
14
14
|
cattr_accessor :json_attrs
|
15
|
-
|
15
|
+
self.json_attrs = ::ModelDrivenApi.smart_merge (json_attrs || {}), {}
|
16
16
|
|
17
17
|
# Here you can add custom actions to be called from the API
|
18
18
|
# The action must return an serializable (JSON) object.
|
@@ -2,7 +2,7 @@ module Api::Printer
|
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
|
4
4
|
included do
|
5
|
-
# Use
|
5
|
+
# Use self.json_attrs to drive json rendering for
|
6
6
|
# API model responses (index, show and update ones).
|
7
7
|
# For reference:
|
8
8
|
# https://api.rubyonrails.org/classes/ActiveModel/Serializers/JSON.html
|
@@ -12,7 +12,9 @@ module Api::Printer
|
|
12
12
|
# - methods: include the result of some method defined in the model
|
13
13
|
# - include: include associated models, it's an object {} which also accepts the keys described here
|
14
14
|
cattr_accessor :json_attrs
|
15
|
-
|
15
|
+
self.json_attrs = ::ModelDrivenApi.smart_merge (json_attrs || {}), {
|
16
|
+
methods: [ :is_online ]
|
17
|
+
}
|
16
18
|
|
17
19
|
# Here you can add custom actions to be called from the API
|
18
20
|
# The action must return an serializable (JSON) object.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_print_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_background_jobs
|