restful-jsonapi 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/restful/jsonapi/railtie.rb +0 -4
- data/lib/restful/jsonapi/restify_param.rb +2 -1
- data/lib/restful/jsonapi/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: 289dd0ec75b00fbdf07719c19d9fde24b6c8cb26517e32f52ae254481885de3e
|
4
|
+
data.tar.gz: 61f7aa986da1c75a0ba9004d6948dc6b85fe66cf4493571a3dedcb5be4e51e57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79a3e4829b05295ea90659badfb4f6711460cfc8e48cb9f731a59d2dfce8b27e71a0a11cf472d3397c0fce6ccba12743fd2be27b1530b66e1a53e0e2a47e94d0
|
7
|
+
data.tar.gz: 7fd46955294e723f3eb9e75eb9bc7298e5f72de3fbc187056e403c33fdf765deafa5a0234bfef08abd557d5b14dfbfb492376c871b0b628e8952ab5d72519bbe
|
@@ -3,17 +3,13 @@ module Restful
|
|
3
3
|
class Railtie < Rails::Railtie
|
4
4
|
initializer "restful-jsonapi.action_controller" do
|
5
5
|
ActiveSupport.on_load(:action_controller) do
|
6
|
-
puts "Extending #{self} with Restful::Jsonapi::RestifyParam"
|
7
6
|
include Restful::Jsonapi::RestifyParam
|
8
|
-
|
9
|
-
puts "Extending #{self} with Restful::Jsonapi::SerializableErrors"
|
10
7
|
include Restful::Jsonapi::SerializableErrors
|
11
8
|
end
|
12
9
|
end
|
13
10
|
|
14
11
|
initializer "restful-jsonapi.active_model_serializer" do
|
15
12
|
ActiveModel::Serializer.class_eval do
|
16
|
-
puts "Extending #{self} with Restful::Jsonapi::ActiveModelSerializer"
|
17
13
|
include Restful::Jsonapi::ActiveModelSerializer
|
18
14
|
end
|
19
15
|
end if defined? ActiveModel::Serializer
|
@@ -13,8 +13,9 @@ module Restful
|
|
13
13
|
if value == params
|
14
14
|
value = params.clone[:data] # leave params alone
|
15
15
|
end
|
16
|
-
value.delete(:type)
|
17
16
|
new_params = ActionController::Parameters.new
|
17
|
+
return new_params if value.nil?
|
18
|
+
value.delete(:type)
|
18
19
|
# relationships
|
19
20
|
if value.has_key? :relationships
|
20
21
|
value.delete(:relationships).each do |relationship_name, relationship_data|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restful-jsonapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Wentz
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2019-05-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.5.1
|
106
|
+
rubygems_version: 3.0.3
|
108
107
|
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: Nice type and params for temporary JSONAPI support.
|