toast 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/toast/plural_assoc_request.rb +4 -4
- data/lib/toast/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3ffc230d6241fe54b81431776232f63395f8149f3632e01ef7151ea353de46bd
|
4
|
+
data.tar.gz: f04101583f930052ad231149b6fb8026784eea410c01f170caea81729026deb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee500860d0639ae2c7e8e9e767d8acd6d9a1edd005237a83adb85401800bd68124f2d8add562039439c04833444ddcccc9fd88e7c744775feda96379d28e15d7
|
7
|
+
data.tar.gz: ea3d957809f004f730786b4182ddaa16a7616e1089bd0a1c7cd4141e68f6e603e4feaf4ab1e23f3b6a18920fcedbdff05c82fdc85d5e5c1c88d4671d92aec1d6
|
@@ -207,7 +207,7 @@ class Toast::PluralAssocRequest
|
|
207
207
|
call_handler(@config.via_link.handler, source, target, @uri_params)
|
208
208
|
|
209
209
|
response :ok,
|
210
|
-
msg: "linked #{target_model_class.name}##{
|
210
|
+
msg: "linked #{target_model_class.name}##{target_id} with #{source.class}##{source.id}.#{@config.assoc_name}",
|
211
211
|
body: Toast.settings.link_unlink_via_post ? '' : nil
|
212
212
|
|
213
213
|
rescue ActiveRecord::RecordNotFound => error
|
@@ -247,7 +247,7 @@ class Toast::PluralAssocRequest
|
|
247
247
|
return response :bad_request, msg: "Link header missing or invalid"
|
248
248
|
end
|
249
249
|
|
250
|
-
name,
|
250
|
+
name, target_id = split_link_header(link)
|
251
251
|
target_model_class = name.singularize.classify.constantize
|
252
252
|
|
253
253
|
unless is_active_record? target_model_class
|
@@ -255,10 +255,10 @@ class Toast::PluralAssocRequest
|
|
255
255
|
end
|
256
256
|
|
257
257
|
call_allow(@config.via_unlink.permissions, @auth, source, @uri_params)
|
258
|
-
call_handler(@config.via_unlink.handler, source, target_model_class.find(
|
258
|
+
call_handler(@config.via_unlink.handler, source, target_model_class.find(target_id), @uri_params)
|
259
259
|
|
260
260
|
response :ok,
|
261
|
-
msg: "unlinked #{target_model_class.name}##{
|
261
|
+
msg: "unlinked #{target_model_class.name}##{target_id} from #{source.class}##{source.id}.#{@config.assoc_name}",
|
262
262
|
body: Toast.settings.link_unlink_via_post ? '' : nil
|
263
263
|
|
264
264
|
rescue ActiveRecord::RecordNotFound => error
|
data/lib/toast/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- robokopp (Robert Annies)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -94,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
|
98
|
-
rubygems_version: 2.5.2.3
|
97
|
+
rubygems_version: 3.0.3
|
99
98
|
signing_key:
|
100
99
|
specification_version: 4
|
101
100
|
summary: Toast exposes ActiveRecord models as a web service (REST API).
|