tao_on_rails 0.7.0 → 0.7.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: 130e2b4ff4f8a942bd21ed9f730890b5cceae063
4
- data.tar.gz: 56bcfaaf1f2ea39abede5493a79c14f6aa9e4e87
3
+ metadata.gz: c2deba8d2fbe402d2bab4729f87f1524039288fa
4
+ data.tar.gz: 69e05fb32a524db56c6ae06a9ec45c2a6ab32d47
5
5
  SHA512:
6
- metadata.gz: fdb3fead11748e863da712cde44a0de990479e2aef83bec1a241a3f48d24c337df4ea5bdb50dd369993715a692b0ebd882c008c217b92b3a0f2f96b58d76c1bb
7
- data.tar.gz: 31435d53c65786d178ca7670acf13e5738eb9cfa52214434a2c58c4ac766f7fd1ebb5b9e69e4f8de5614ee6d2acc81bfc5f28dd5651e1d48ce666a42ef0a98b6
6
+ metadata.gz: a3abfe10f45c122e1d91379cae14c6914a55055f66193190cfd769e41b7e4b4273e5f595e389edc5c2f051e06cb33c9f671cdab5932e2888daea4dfe4d17f512
7
+ data.tar.gz: a641726dcb3cb0e1cfec78debe9bbdcd729d78da8bf248570ae71606bfb33e89eb0a50fca0157d48e0a3f1a727832f6040e86392da1c2314c52876ba8ea73f00
@@ -12,7 +12,11 @@ module TaoOnRails
12
12
 
13
13
  def render &block
14
14
  if view.lookup_context.exists?(template_path, [], true)
15
- view.render layout: template_path, locals: {component: self}, &block
15
+ if block_given?
16
+ view.render layout: template_path, locals: {component: self}, &block
17
+ else
18
+ view.render partial: template_path, locals: {component: self}
19
+ end
16
20
  else
17
21
  view.content_tag self.class.tag_name, options, &block
18
22
  end
@@ -33,7 +37,7 @@ module TaoOnRails
33
37
  end
34
38
 
35
39
  def self.template_path
36
- @template_path ||= "components/#{self.name.underscore}"
40
+ @template_path ||= "components/#{self.name.underscore.gsub(/(.+)_component$/, '\1')}"
37
41
  end
38
42
 
39
43
  end
@@ -1,3 +1,3 @@
1
1
  module TaoOnRails
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tao_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siyuan Liu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-23 00:00:00.000000000 Z
12
+ date: 2017-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: turbolinks