effective_resources 0.9.4 → 0.9.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21853b78ef80f371a34daf7b3d7c564f6ec2c0b1
|
4
|
+
data.tar.gz: 5c2d774be427d0f2f97b4cd7c65234415b47051d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edd2720674a16a3d40d355eac77d42720057c49c84da3c4f566f1384ca20ce258815a282608d080f9db65917d6cdc56b3e19a1f8b4292c94d7da9a5eb0bc9f64
|
7
|
+
data.tar.gz: 6c623bac92e6dffa4da445f837b388165632bf5085fdb41b71ff8d764437aac8edaaaa9835c55d20ada75cef0c7ad02c45729e3fdcc840e8d1ca13c9b8129875
|
@@ -335,6 +335,7 @@ module Effective
|
|
335
335
|
raise 'expected post, patch or put http action' unless (request.post? || request.patch? || request.put?)
|
336
336
|
|
337
337
|
respond_to do |format|
|
338
|
+
|
338
339
|
if save_resource(resource, action, (send(resource_params_method_name) rescue {}))
|
339
340
|
request.format = :html if specific_redirect_path?(action)
|
340
341
|
|
@@ -414,7 +415,7 @@ module Effective
|
|
414
415
|
|
415
416
|
ActiveRecord::Base.transaction do
|
416
417
|
begin
|
417
|
-
resource.assign_attributes(to_assign) if to_assign.
|
418
|
+
resource.assign_attributes(to_assign) if to_assign.respond_to?(:permitted?) && to_assign.permitted?
|
418
419
|
|
419
420
|
if resource.public_send("#{action}!") == false
|
420
421
|
raise("failed to #{action} #{resource}")
|
@@ -425,6 +426,8 @@ module Effective
|
|
425
426
|
run_callbacks(:resource_save)
|
426
427
|
return true
|
427
428
|
rescue => e
|
429
|
+
Rails.logger.info "Failed to #{action}: #{e.message}" if Rails.env.development?
|
430
|
+
|
428
431
|
if resource.respond_to?(:restore_attributes) && resource.persisted?
|
429
432
|
resource.restore_attributes(['status', 'state'])
|
430
433
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|