will_toggle 0.0.1.1 → 0.0.2

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: 4e08c597cadc4ac71c53fafa4f063f97fb7d7800
4
- data.tar.gz: d8f1562050a0b859e62d2a615c897e983db0f152
3
+ metadata.gz: ec5374cc59fe4999fbaff5aa7fbddcd6ea1baebe
4
+ data.tar.gz: 2aeb74a444061a42da77e3eb02dda0ce4becc552
5
5
  SHA512:
6
- metadata.gz: 9ea61e8f4ec6c8349cfc3dfff39e8e22c4266bc83aa46598813b6d652b3e4f92b7bfef3df6870a15d5238f909c70039eefddd8b917783b1fa590b1d2b34d78a4
7
- data.tar.gz: c57228d668858489f772581ec3a3341c88719d7eb08b32da987c51c495cc2927f0aeeb0796cca637a3f3b2c00831c38660742cbfbc01bd52f81e41e1e51c683b
6
+ metadata.gz: b555f16b6213474981cb1f3781df2054e1ee2796ea7269b9170957d57151400485e569309c7898bcd958b66462ea7fbd941d948c3d06549c0fcb12a42ea22ece
7
+ data.tar.gz: 5c00f2042b86c036a87d38360913a97517f13600c06ef35e8be2acb6d478789de8adc02acd9e527fcf433d5c00907984bc51de3e0a56f6ec9ec503aa4f2262ea
data/lib/view_helpers.rb CHANGED
@@ -38,12 +38,16 @@ module WillToggle
38
38
  end
39
39
 
40
40
  def get_partial(options = {})
41
- j render partial: options[:partial],
42
- locals: options[:locals]
41
+ render partial: options[:partial],
42
+ locals: options[:locals]
43
43
  end
44
44
 
45
45
  def js_call(options)
46
- "willToggle.toggleNext('#will-toggle-#{ @@toggle_index }', #{ options[:clear_data] });"
46
+ "willToggle.toggleNext(\'#will-toggle-#{ @@toggle_index }\'#{ js_options(options) });".html_safe
47
+ end
48
+
49
+ def js_options(options)
50
+ " , #{ options[:clear_data] }" if options[:clear_data]
47
51
  end
48
52
  end
49
53
  end
@@ -1,3 +1,3 @@
1
1
  module WillToggle
2
- VERSION = "0.0.1.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_toggle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Otander