mirror of
https://github.com/github/rails.git
synced 2026-01-24 22:08:15 -05:00
Make render(:inline) use locals #1556 [Michael Shuerig]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1584 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -471,7 +471,14 @@ module ActionController #:nodoc:
|
||||
render(options.merge({ :file => options[:template], :use_full_path => true }))
|
||||
|
||||
elsif options[:inline]
|
||||
render(options.merge({ :text => @template.render_template(options[:type] || :rhtml, options[:inline]) }))
|
||||
render(options.merge({
|
||||
:text =>
|
||||
@template.render_template(
|
||||
options[:type] || :rhtml,
|
||||
options[:inline],
|
||||
options[:locals] || {}
|
||||
)
|
||||
}))
|
||||
|
||||
elsif options[:action]
|
||||
render(options.merge({ :template => default_template_name(options[:action]) }))
|
||||
|
||||
@@ -194,8 +194,10 @@ module ActionView #:nodoc:
|
||||
render_file(options[:file], options[:use_full_path], options[:locals])
|
||||
elsif options[:partial] && options[:collection]
|
||||
render_partial_collection(options[:partial], options[:collection], options[:spacer_template], options[:locals])
|
||||
elsif options.is_a?(Hash) && options[:partial]
|
||||
elsif options[:partial]
|
||||
render_partial(options[:partial], options[:object], options[:locals])
|
||||
elsif options[:inline]
|
||||
render_template(options[:type] || :rhtml, options[:inline], options[:locals] || {})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user