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 +4 -4
- data/lib/tao_on_rails/components/base.rb +6 -2
- data/lib/tao_on_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2deba8d2fbe402d2bab4729f87f1524039288fa
|
4
|
+
data.tar.gz: 69e05fb32a524db56c6ae06a9ec45c2a6ab32d47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/tao_on_rails/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2017-03-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: turbolinks
|