way 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. data/lib/way.rb +21 -1
  2. metadata +3 -3
data/lib/way.rb CHANGED
@@ -1,2 +1,22 @@
1
- module Way
1
+ module ActionView
2
+ PartialRenderer.class_eval do
3
+ def render_partial
4
+ locals, view, block = @locals, @view, @block
5
+ object, as = @object, @variable
6
+
7
+ if !block && (layout = @options[:layout])
8
+ layout = find_template(layout)
9
+ end
10
+
11
+ object ||= locals[as]
12
+ locals[as] = object
13
+
14
+ content = @template.render(view, locals) do |*name|
15
+ view._layout_for(*name, &block)
16
+ end
17
+
18
+ content = layout.render(view, locals){ content } if layout
19
+ content << "#{@template.inspect}"
20
+ end
21
+ end
2
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: way
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,9 +9,9 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-26 00:00:00.000000000 Z
12
+ date: 2012-04-27 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Note - this gem is still under development and not fully working, yet.
14
+ description:
15
15
  email: calebcohoon@gmail.com
16
16
  executables: []
17
17
  extensions: []