effective_resources 0.8.7 → 0.8.8
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: af652588589a492b171dde5205e983a4f3db5da5
|
4
|
+
data.tar.gz: 6686530adc12a0142ddda93a742a4e9ca0914d8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cea2cb1c2604a60c1c61d7fcf519f1c86a5faed759affdc3eaf8f330371ce7d88b57704939a2c6b29d76568769f12a09472bde6f055ae2ec84344e929da039e9
|
7
|
+
data.tar.gz: d74d1454cbb8a44c6ba56e0b890278a51f82c08c69dc688240b532d7dde0a3cbabb3ef2e1e2a483460f9f86b0d4d357bed39539eeca0e3d6674e5f0d3e23e0bb
|
@@ -210,7 +210,7 @@ module Effective
|
|
210
210
|
end
|
211
211
|
|
212
212
|
format.js do
|
213
|
-
if
|
213
|
+
if specific_redirect_path?
|
214
214
|
flash[:success] ||= resource_flash(:success, resource, action)
|
215
215
|
redirect_to(resource_redirect_path)
|
216
216
|
else
|
@@ -266,7 +266,7 @@ module Effective
|
|
266
266
|
end
|
267
267
|
|
268
268
|
format.js do
|
269
|
-
if
|
269
|
+
if specific_redirect_path?
|
270
270
|
flash[:success] ||= resource_flash(:success, resource, action)
|
271
271
|
redirect_to(resource_redirect_path)
|
272
272
|
else
|
@@ -300,7 +300,7 @@ module Effective
|
|
300
300
|
end
|
301
301
|
|
302
302
|
format.js do
|
303
|
-
if
|
303
|
+
if specific_redirect_path?
|
304
304
|
flash[:success] ||= resource_flash(:success, resource, action)
|
305
305
|
redirect_to(resource_redirect_path)
|
306
306
|
else
|
@@ -542,6 +542,10 @@ module Effective
|
|
542
542
|
{ action: :save }
|
543
543
|
end
|
544
544
|
|
545
|
+
def specific_redirect_path?
|
546
|
+
(commit_action[:redirect].respond_to?(:call) ? instance_exec(&commit_action[:redirect]) : commit_action[:redirect]).present?
|
547
|
+
end
|
548
|
+
|
545
549
|
# Returns an ActiveRecord relation based on the computed value of `resource_scope` dsl method
|
546
550
|
def resource_scope # Thing
|
547
551
|
@_effective_resource_relation ||= (
|
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.8.
|
4
|
+
version: 0.8.8
|
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-04
|
11
|
+
date: 2018-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|