super_tools 0.0.11 → 0.0.12

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: e34e17b82e30a51a756740e454d87c0fb0491bd3
4
- data.tar.gz: 1809323aff509afd47a2cf09c0e3a899745e3877
3
+ metadata.gz: e7d4fdaf5916965c3585fd595a0f190fbfc64f14
4
+ data.tar.gz: a0d01581b71688501b8375f775c92c3b3d8a3fc5
5
5
  SHA512:
6
- metadata.gz: 7fb48009b23ad83f0993f8e84cddffd3ab63dd451a771a1cc960dc20415dfeeb68c1279fdac112f4a99c4560dcd91952c1cd65dab8c4ba7b0b26fec652ab5f75
7
- data.tar.gz: 147f196d541b7a54f6b9b36efe7c850acd43f9a518f71ba257bdc44fafaa3c185105da9fb4cc6864af0afdd420c66c85a0678a4b68921ef69e2f8c773a2ee0d5
6
+ metadata.gz: 300cb71a4965abc27138b60b780b4f8a79b9b4d47f2f23f0c660957c3f4cde451175eafcddd0f358910d17672476ed1f80b852e4ecdc749593739882a5429a56
7
+ data.tar.gz: c4902c4a0468b72fb20c4e3d7020ea95bf9ca5a946bbf3bd1ae1ff69102c26d3e2276b93819cdb22309665e736da3279c4d28cadefda3ed07b4267f36728bdf0
@@ -32,7 +32,12 @@ module SuperInteraction
32
32
  # 注意:不要包 respond_to :js 會有問題
33
33
  def modal(partial: nil, size: 'md', title: '', desc: '')
34
34
  partial ||= context.action_name
35
- modal_html = context.render_to_string(partial, layout: 'modal.html.haml', locals: { bs_modal_size: size, title: title, desc: desc })
35
+ case Rails.version[0]
36
+ when "4"
37
+ modal_html = context.render_to_string(partial, layout: 'modal.html.haml', locals: { bs_modal_size: size, title: title, desc: desc })
38
+ when "5", "6"
39
+ modal_html = context.render_to_string(partial, layout: 'modal.html.haml', assigns: { bs_modal_size: size, title: title, desc: desc })
40
+ end
36
41
  cmd("$(function() { $.modal.show('#{helpers.j(modal_html)}'); });")
37
42
  end
38
43
 
@@ -1,3 +1,3 @@
1
1
  module SuperTools
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - eddie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-30 00:00:00.000000000 Z
11
+ date: 2020-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler