way 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/way.rb +18 -20
- metadata +21 -38
data/lib/way.rb
CHANGED
@@ -1,33 +1,31 @@
|
|
1
1
|
module ActionView
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
object, as = @object, @variable
|
2
|
+
class PartialRenderer
|
3
|
+
def render_partial
|
4
|
+
locals, view, block = @locals, @view, @block
|
5
|
+
object, as = @object, @variable
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
object ||= locals[as]
|
13
|
-
locals[as] = object
|
7
|
+
if !block && (layout = @options[:layout])
|
8
|
+
layout = find_template(layout)
|
9
|
+
end
|
14
10
|
|
15
|
-
|
16
|
-
|
17
|
-
end
|
11
|
+
object ||= locals[as]
|
12
|
+
locals[as] = object
|
18
13
|
|
19
|
-
|
14
|
+
content = @template.render(view, locals) do |*name|
|
15
|
+
view._layout_for(*name, &block)
|
16
|
+
end
|
20
17
|
|
21
|
-
|
22
|
-
content << "#{@template.inspect}"
|
23
|
-
end
|
18
|
+
content = layout.render(view, locals){ content } if layout
|
24
19
|
|
25
|
-
|
20
|
+
if @view.controller && @view.controller.params.has_key?('_way')
|
21
|
+
content << "#{@template.inspect}"
|
26
22
|
end
|
23
|
+
|
24
|
+
content
|
27
25
|
end
|
28
26
|
end
|
29
27
|
|
30
|
-
Base
|
28
|
+
class Base
|
31
29
|
def render_partial options = {}
|
32
30
|
local_assigns = options[:locals] || {}
|
33
31
|
|
metadata
CHANGED
@@ -1,62 +1,45 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: way
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
version: 1.1.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.2
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Caleb Cohoon
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2012-05-02 00:00:00 -07:00
|
18
|
-
default_executable:
|
12
|
+
date: 2012-05-02 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description:
|
22
15
|
email: calebcohoon@gmail.com
|
23
16
|
executables: []
|
24
|
-
|
25
17
|
extensions: []
|
26
|
-
|
27
18
|
extra_rdoc_files: []
|
28
|
-
|
29
|
-
files:
|
19
|
+
files:
|
30
20
|
- lib/way.rb
|
31
|
-
has_rdoc: true
|
32
21
|
homepage:
|
33
22
|
licenses: []
|
34
|
-
|
35
23
|
post_install_message:
|
36
24
|
rdoc_options: []
|
37
|
-
|
38
|
-
require_paths:
|
25
|
+
require_paths:
|
39
26
|
- lib
|
40
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
requirements:
|
49
|
-
- -
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
|
52
|
-
- 0
|
53
|
-
version: "0"
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
54
39
|
requirements: []
|
55
|
-
|
56
40
|
rubyforge_project:
|
57
|
-
rubygems_version: 1.
|
41
|
+
rubygems_version: 1.8.23
|
58
42
|
signing_key:
|
59
43
|
specification_version: 3
|
60
44
|
summary: Find partials in your Rails app easily!
|
61
45
|
test_files: []
|
62
|
-
|