rails-sweetalert2-confirm 0.9.7 → 0.9.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: 1423bcc9a21daca893c5ebf0882f549f21032667
|
4
|
+
data.tar.gz: 3fd604c6fc7f19f5b13fcb4091372df153ae7300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58e3d4a38b7b47d4322528334f156855c231054faf6cf2b937ec66d71db7129b496f0657efb14963472014e3a982b79390c80eb2c6582f0bcf5dd5f4ec4ca4bf
|
7
|
+
data.tar.gz: 0607985d4a74c65ae178787dd5f734e759375d49fd02e9cb23e317a599fe49eb40789008a75d5f0e5ebb4e70c34dc2257013bc139f1f0bf5b74593bafe10a67a
|
@@ -26,14 +26,14 @@ module RailsSweetAlert2Confirm
|
|
26
26
|
protected
|
27
27
|
|
28
28
|
def merge_options_into_swal(options)
|
29
|
+
return options unless options_has_confirm?(options)
|
29
30
|
options = merge_confirm_into_swal(options)
|
30
31
|
options = merge_remote_into_swal(options)
|
31
32
|
merge_method_into_swal(options)
|
32
33
|
end
|
33
34
|
|
34
|
-
%w(remote method confirm).
|
35
|
+
%w(remote method confirm).each_with_index do |option|
|
35
36
|
define_method("merge_#{option}_into_swal") do |options|
|
36
|
-
return if %w(remote method).include?(option) && !options_has_confirm?
|
37
37
|
if send("options_has_#{option}?", options)
|
38
38
|
options[:data] ||= {}
|
39
39
|
options[:data][:swal] ||= {}
|