pragma-rails 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pragma/rails/controller.rb +4 -2
- data/lib/pragma/rails/hooks.rb +9 -0
- data/lib/pragma/rails/version.rb +1 -1
- data/lib/pragma/rails.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab9ede65466d1182c761666f6e20910ade9d61f4
|
4
|
+
data.tar.gz: 30510d4d09ab978602f2322be02e7ec4b87f2e7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea5e425d9c514718dfaa7a7fb16bc812ad75ebf13160802e37acf9c70f4ac0a5d8336fc11e8856af343807b4131ef1ab080270ffc7a98b4b92355f39fb4d0cf7
|
7
|
+
data.tar.gz: 77f19339e72c26fadb0b351b61ebb9770e9b17b41a9afc0d3458de5aff737611325737327d846bd21151687c09fed761e719f6600c6ecbc68a84ceaa0ac17729
|
@@ -16,7 +16,7 @@ module Pragma
|
|
16
16
|
# @param operation_klass [Class|String] a subclass of +Pragma::Operation::Base+
|
17
17
|
def run(operation_klass)
|
18
18
|
result = operation_klass.to_s.constantize.call(
|
19
|
-
params: operation_params,
|
19
|
+
params: operation_params.to_h,
|
20
20
|
current_user: operation_user
|
21
21
|
)
|
22
22
|
|
@@ -25,7 +25,9 @@ module Pragma
|
|
25
25
|
end
|
26
26
|
|
27
27
|
if result.resource
|
28
|
-
render status: result.status, json: result.resource.
|
28
|
+
render status: result.status, json: result.resource.to_json(user_options: {
|
29
|
+
expand: params[:expand]
|
30
|
+
})
|
29
31
|
else
|
30
32
|
head result.status
|
31
33
|
end
|
data/lib/pragma/rails/version.rb
CHANGED
data/lib/pragma/rails.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pragma-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Desantis
|
@@ -147,6 +147,7 @@ files:
|
|
147
147
|
- bin/setup
|
148
148
|
- lib/pragma/rails.rb
|
149
149
|
- lib/pragma/rails/controller.rb
|
150
|
+
- lib/pragma/rails/hooks.rb
|
150
151
|
- lib/pragma/rails/resource_controller.rb
|
151
152
|
- lib/pragma/rails/version.rb
|
152
153
|
- pragma-rails.gemspec
|