render_parent 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/render_parent/rails3/on_load_action_view.rb +7 -19
- 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: 7a6a7c509bb7cd2ca896ade76896f000c7bdba34
|
4
|
+
data.tar.gz: cca2f96a37664f288580cf40c4069331191c79b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc86d10ec052c53447d0b69b2b039d93ce05e6219e0fb8ba5dcb57527f7c27b92412c035572b36dd79c525fe1ab650d9a1b20340d460c2fe4f2a837c23c2fce5
|
7
|
+
data.tar.gz: 484d0fedf8e276573c6ef3b75f3f95d376123888981c6867839dbf1b7c8fa9f50db18e75472cdb850556ab263f1aacbdd6c8c6d1a0e210fc2b93e0d7c28ca129
|
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
|
|
18
18
|
gem.homepage = "http://github.com/anteo/render-parent"
|
19
19
|
gem.license = "MIT"
|
20
20
|
gem.summary = %Q{Adds Rails "render :parent" helper, which renders template with the same name as current but higher on the view path}
|
21
|
-
gem.description = %Q{This version
|
21
|
+
gem.description = %Q{This version fixes render_collection}
|
22
22
|
gem.email = "anton.argirov@gmail.com"
|
23
23
|
gem.authors = ["Anton Argirov"]
|
24
24
|
gem.files = Dir.glob('lib/**/*.rb') + %w(.document Gemfile LICENSE.txt README.rdoc Rakefile VERSION)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'action_view/helpers/rendering_helper'
|
2
|
-
require 'action_view/
|
2
|
+
require 'action_view/template'
|
3
3
|
|
4
4
|
ActionView::Helpers::RenderingHelper.module_eval do
|
5
5
|
def render_parent_template(locals = {}, &block)
|
@@ -51,26 +51,14 @@ ActionView::PathSet.class_eval do
|
|
51
51
|
alias_method_chain :find_all, :exclusions
|
52
52
|
end
|
53
53
|
|
54
|
-
ActionView::
|
55
|
-
def
|
56
|
-
template_stack =
|
57
|
-
template_stack.push(
|
58
|
-
result =
|
54
|
+
ActionView::Template.class_eval do
|
55
|
+
def render_with_active_template(view, locals, buffer=nil, &block)
|
56
|
+
template_stack = view.controller.respond_to?(:active_template_stack) && view.controller.active_template_stack
|
57
|
+
template_stack.push(self) if template_stack
|
58
|
+
result = render_without_active_template(view, locals, buffer, &block)
|
59
59
|
template_stack.pop if template_stack
|
60
60
|
result
|
61
61
|
end
|
62
62
|
|
63
|
-
alias_method_chain :
|
63
|
+
alias_method_chain :render, :active_template
|
64
64
|
end
|
65
|
-
|
66
|
-
ActionView::PartialRenderer.class_eval do
|
67
|
-
def render_partial_with_active_template
|
68
|
-
template_stack = @view.controller.respond_to?(:active_template_stack) && @view.controller.active_template_stack
|
69
|
-
template_stack.push(@template) if template_stack
|
70
|
-
result = render_partial_without_active_template
|
71
|
-
template_stack.pop if template_stack
|
72
|
-
result
|
73
|
-
end
|
74
|
-
|
75
|
-
alias_method_chain :render_partial, :active_template
|
76
|
-
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: render_parent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Argirov
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: This version
|
55
|
+
description: This version fixes render_collection
|
56
56
|
email: anton.argirov@gmail.com
|
57
57
|
executables: []
|
58
58
|
extensions: []
|