execjs-rails 0.0.6 → 0.0.6.1

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: 20b99d427d6dd48dcb8e08bd8e9fbbd055adb87c
4
- data.tar.gz: a207fbce620184b1280d37530ace7ead33361a1d
3
+ metadata.gz: 7b3e545fec27d1e7906a4caa437b281dc5baa428
4
+ data.tar.gz: ddc613d20daefde8cf884e39363b0a080d8619b8
5
5
  SHA512:
6
- metadata.gz: 218addd8d037f808de2dfd41ac491dbe6f40541b65dc52fb797760c20d7f77a312c582421f99b758d5439d16949fda86a8bc330f0b4dc13f2f919920532999c6
7
- data.tar.gz: 77ad4ced87fb69cebc8842ed06846fc131ed9b3f314f869076e1a2b2b31c8dbe182874823a88c38d32ea8beb7c6f7aabf66fa9354f9e0caec0eafa4a4ed6c933
6
+ metadata.gz: 818b63cf094c9f67d8c5a870d109b34c3d8c76c8daa4673b9109f56d85a22f41bda77cd0287200636136fbba8fcf61003a507f6511c85239c559f8f0fed66a24
7
+ data.tar.gz: 267e16e2129de9fdb041af3c0a88d057081cd5d1abfc0afab4a7762c9d922865c6a7afe890b42e1661142cb8e2fa69c9ff04e0695043a489fbf9488e268a9cef
@@ -3,16 +3,20 @@ module ExecJS
3
3
  class TemplateResolver < ::ActionView::Resolver
4
4
 
5
5
  def find_templates(name, prefix, partial, details)
6
- path = "#{prefix}/#{name}"
7
- [::ActionView::Template.new(
8
- "<%= execjs_render('#{path}') %>",
9
- "ExecJS - #{path}",
10
- ActionView::Template.registered_template_handler(:erb),
11
- {
12
- format: Mime[:erb],
13
- virtual_path: path
14
- }
15
- )]
6
+ if details[:formats].include?(:html)
7
+ path = "#{prefix}/#{name}"
8
+ [::ActionView::Template.new(
9
+ "<%= execjs_render('#{path}') %>",
10
+ "ExecJS - #{path}",
11
+ ActionView::Template.registered_template_handler(:erb),
12
+ {
13
+ format: Mime[:erb],
14
+ virtual_path: path
15
+ }
16
+ )]
17
+ else
18
+ []
19
+ end
16
20
  end
17
21
 
18
22
  end
@@ -1,5 +1,5 @@
1
1
  module ExecJS
2
2
  module Rails
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.6.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: execjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Revelry Labs, LLC