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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca8126cf30f04a6410c38ebe21bff67a8bbf2cb1
4
- data.tar.gz: f2b9f88ae90d694873add1150c0c33235ccb546a
3
+ metadata.gz: e9c577cc864c9b275246a6d568fc3427897b3fc0
4
+ data.tar.gz: 9ca949d3bea0894cca516efa239bd8f8b8f2d1a6
5
5
  SHA512:
6
- metadata.gz: ad2a51666570a073cc271859b88560f35ecbb1bdb1e37ddf249e466ed6605f3277c5c5f815fe6b970dfcc53bb345d4451ce544064acf9127a403a1491d0d3763
7
- data.tar.gz: 64a6f6c494b22a7266ea78966f34f2032bc1708130a1955603a18e653f50ee73e1322f122211dc11ce05d02f003d38595f872511f01df9bd35892593c5e67f80
6
+ metadata.gz: 5aca9b31b4e0ca4e5d988bd51da980cd31936f9f6e62f5e51dd2c156448a0a2597e8336d56a2fc77799168ab7e1042e67bcf8b7b60b51db5ede47c5be234bb4b
7
+ data.tar.gz: bbdd67972b18783aa8e5d271163d481ab2258950230fe9f335f643b01567eb6331741876958922e49ac7203250dd1524d011f4c5983fe73554ab64dca1810c3d
@@ -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}.init_#{js_custom_name}) { #{application_name}.#{js_namespace_name}.init_#{js_custom_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}.init_#{js_function_name}) { #{application_name}.#{js_namespace_name}.init_#{js_function_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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsUtils
4
- VERSION = "3.3.6"
4
+ VERSION = "4.0.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.6
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winston Teo