rails_utils 3.3.6 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_utils.rb +2 -2
- data/lib/rails_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9c577cc864c9b275246a6d568fc3427897b3fc0
|
4
|
+
data.tar.gz: 9ca949d3bea0894cca516efa239bd8f8b8f2d1a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aca9b31b4e0ca4e5d988bd51da980cd31936f9f6e62f5e51dd2c156448a0a2597e8336d56a2fc77799168ab7e1042e67bcf8b7b60b51db5ede47c5be234bb4b
|
7
|
+
data.tar.gz: bbdd67972b18783aa8e5d271163d481ab2258950230fe9f335f643b01567eb6331741876958922e49ac7203250dd1524d011f4c5983fe73554ab64dca1810c3d
|
data/lib/rails_utils.rb
CHANGED
@@ -38,14 +38,14 @@ module RailsUtils
|
|
38
38
|
|
39
39
|
if content_for?(:js_init_method)
|
40
40
|
js_custom_name = content_for(:js_init_method)
|
41
|
-
custom_js_init_method = "if(#{application_name}.#{js_namespace_name}
|
41
|
+
custom_js_init_method = "if(#{application_name}.#{js_namespace_name}.#{js_custom_name}.init) { #{application_name}.#{js_namespace_name}.#{js_custom_name}.init(); }"
|
42
42
|
end
|
43
43
|
|
44
44
|
javascript_tag <<-JS
|
45
45
|
#{application_name}.init();
|
46
46
|
if(#{application_name}.#{js_namespace_name}) {
|
47
47
|
if(#{application_name}.#{js_namespace_name}.init) { #{application_name}.#{js_namespace_name}.init(); }
|
48
|
-
if(#{application_name}.#{js_namespace_name}
|
48
|
+
if(#{application_name}.#{js_namespace_name}.#{js_function_name} && #{application_name}.#{js_namespace_name}.#{js_function_name}.init) { #{application_name}.#{js_namespace_name}.#{js_function_name}.init(); }
|
49
49
|
#{custom_js_init_method}
|
50
50
|
}
|
51
51
|
JS
|
data/lib/rails_utils/version.rb
CHANGED