edifice 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
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)
@@ -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, (layout_name.nil? ? '' : layout_name.split('/').last))
20
+ template.virtual_path.prefix, layout)
18
21
  end
19
22
 
20
23
  super(template, layout_name, locals)
@@ -1,3 +1,3 @@
1
1
  module Edifice
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.0"
3
3
  end
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: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 1
9
- - 1
10
- version: 1.1.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-01-22 00:00:00 Z
20
+ date: 2012-06-14 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rake