edifice 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/lib/edifice/renderer.rb +4 -1
- data/lib/edifice/version.rb +1 -1
- metadata +5 -5
data/README.md
CHANGED
|
@@ -79,4 +79,4 @@ Alternatively you could define `onLoad` (which fires on `window.load`), or nothi
|
|
|
79
79
|
License
|
|
80
80
|
-------
|
|
81
81
|
|
|
82
|
-
Edifice is crafted by [Percolate Studio](http://percolatestudio.com) and released under the [MIT license](www.opensource.org/licenses/MIT)
|
|
82
|
+
[Edifice](http://edifice-rails.com) is crafted by [Percolate Studio](http://percolatestudio.com) and released under the [MIT license](www.opensource.org/licenses/MIT)
|
data/lib/edifice/renderer.rb
CHANGED
|
@@ -11,10 +11,13 @@ module Edifice
|
|
|
11
11
|
|
|
12
12
|
class TemplateRenderer < ActionView::TemplateRenderer
|
|
13
13
|
def render_template(template, layout_name = nil, locals = {})
|
|
14
|
+
layout_name = layout_name.call if layout_name.is_a? Proc
|
|
15
|
+
layout = if layout_name.is_a? String then layout_name.split('/').last else '' end
|
|
16
|
+
|
|
14
17
|
# ensure we aren't rendering e.g. text
|
|
15
18
|
if template.respond_to?(:virtual_path) and @view.controller and @view.controller.respond_to?(:set_edifice_names)
|
|
16
19
|
@view.controller.set_edifice_names(template.virtual_path.name,
|
|
17
|
-
template.virtual_path.prefix,
|
|
20
|
+
template.virtual_path.prefix, layout)
|
|
18
21
|
end
|
|
19
22
|
|
|
20
23
|
super(template, layout_name, locals)
|
data/lib/edifice/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: edifice
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 31
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
version: 1.
|
|
8
|
+
- 2
|
|
9
|
+
- 0
|
|
10
|
+
version: 1.2.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Tom Coleman
|
|
@@ -17,7 +17,7 @@ autorequire:
|
|
|
17
17
|
bindir: bin
|
|
18
18
|
cert_chain: []
|
|
19
19
|
|
|
20
|
-
date: 2012-
|
|
20
|
+
date: 2012-06-14 00:00:00 Z
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|
|
23
23
|
name: rake
|