effective_resources 1.8.10 → 1.8.11

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
  SHA256:
3
- metadata.gz: dc3c685dc56b79f0af482b0cf0d67e0dacafd6b9dc1e032cceb5d688b44752d6
4
- data.tar.gz: e5b9f21ab57e68f9fbc601d6a41cc40358f47f92850e80c756e75f7c52d13383
3
+ metadata.gz: 2703faba8c8b14643c0e0f75e958bf27471b5d54fba6461d24e583156f7badae
4
+ data.tar.gz: 917291289d6e5530f04ddf65d03da2f828d0bf00dce53d79fc6e3f67c7d7a421
5
5
  SHA512:
6
- metadata.gz: 044ee953eb0e281c9f85c95934a2824a80d73a2779e4799e716374e7f1fe932255339bd56efc918333a9886eaef0baa0c4400a43db1060ddd40ee2c2f988d7d5
7
- data.tar.gz: 6d337535d4e2c37da1f8d5bbeb5c6dd95621bb3789b873fcf94364fd21fd5750a7a31c0c5e6d6be28d560525c6b5a7c1de9d8a56b6abdf710e2cc771c71a35c5
6
+ metadata.gz: 7033816b0b5c53b7f6ebccf7269aa635effb7f792e6dbbf55d83d546980612ecba3f3d18b160c46c5f6e353724763e63efb55e8ffa23c2f360eea1d3e1057635
7
+ data.tar.gz: e7b77545e441aec916ecbe3ca0fc35e8c9d14eeb6b7d3553e8b8e5be7af7ef71b735c89b480d5a91a3288f03a48b2846ac6f7f05a744a6bdb1d758d83630e08b
@@ -15,7 +15,7 @@ module Effective
15
15
 
16
16
  format.js do
17
17
  flash[:success] ||= resource_flash(:success, resource, action)
18
- redirect_to(resource_redirect_path(resource, action))
18
+ render(action, locals: { remote_form_redirect: resource_redirect_path(resource, action)}) # action.js.erb
19
19
  end
20
20
  end
21
21
  elsif template_present?(action)
@@ -4,8 +4,8 @@
4
4
  EffectiveForm.remote_form_payload = "<%= j render_resource_form(@resource) %>";
5
5
  EffectiveForm.remote_form_commit = "<%= params[:commit] %>";
6
6
  EffectiveForm.remote_form_flash = <%= raw flash.to_json %>;
7
+ EffectiveForm.remote_form_redirect = "<%= local_assigns[:remote_form_redirect] %>";
7
8
 
8
9
  <% if @resource.respond_to?(:refresh_datatables) && @resource.refresh_datatables.present? %>
9
10
  EffectiveForm.remote_form_refresh_datatables = <%= raw Array(@resource.refresh_datatables).uniq.compact.map(&:to_s) %>;
10
11
  <% end %>
11
-
@@ -4,6 +4,7 @@
4
4
  EffectiveForm.remote_form_payload = '';
5
5
  EffectiveForm.remote_form_commit = "<%= params[:commit] %>";
6
6
  EffectiveForm.remote_form_flash = <%= raw flash.to_json %>;
7
+ EffectiveForm.remote_form_redirect = "<%= local_assigns[:remote_form_redirect] %>";
7
8
 
8
9
  <% if @resource.respond_to?(:refresh_datatables) && @resource.refresh_datatables.present? %>
9
10
  EffectiveForm.remote_form_refresh_datatables = <%= raw Array(@resource.refresh_datatables).uniq.compact.map(&:to_s) %>;
@@ -5,6 +5,10 @@ EffectiveForm.remote_form_payload = "<%= j render_resource_form(@resource, actio
5
5
  EffectiveForm.remote_form_commit = "<%= params[:commit] %>";
6
6
  EffectiveForm.remote_form_flash = <%= raw flash.to_json %>;
7
7
 
8
+ <% if !request.get? %>
9
+ EffectiveForm.remote_form_redirect = "<%= local_assigns[:remote_form_redirect] %>";
10
+ <% end %>
11
+
8
12
  <% if !request.get? && @resource.respond_to?(:refresh_datatables) && @resource.refresh_datatables.present? %>
9
13
  EffectiveForm.remote_form_refresh_datatables = <%= raw Array(@resource.refresh_datatables).uniq.compact.map(&:to_s) %>;
10
14
  <% end %>
@@ -4,6 +4,7 @@
4
4
  EffectiveForm.remote_form_payload = "<%= j render_resource_form(@resource) %>";
5
5
  EffectiveForm.remote_form_commit = "<%= params[:commit] %>";
6
6
  EffectiveForm.remote_form_flash = <%= raw flash.to_json %>;
7
+ EffectiveForm.remote_form_redirect = "<%= raw local_assigns[:remote_form_redirect] %>";
7
8
 
8
9
  <% if @resource.respond_to?(:refresh_datatables) && @resource.refresh_datatables.present? %>
9
10
  EffectiveForm.remote_form_refresh_datatables = <%= raw Array(@resource.refresh_datatables).uniq.compact.map(&:to_s) %>;
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '1.8.10'.freeze
2
+ VERSION = '1.8.11'.freeze
3
3
  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: 1.8.10
4
+ version: 1.8.11
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: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2021-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails