This project is archived and is in readonly mode.
Unify ActionController::Base#render
Reported by DHH | November 22nd, 2008 @ 05:21 PM
Now that we've unified ActionView::Base#render, it's time to do the same with ActionController::Base#render. The changes should be as follows:
Make render(string) expand to render(:template => string)
Unify the :file/:template/:action calls to just be :template (which then can be contracted to render(string)).
render :file => '/Users/what/ever.html.erb' -> render('/Users/what/ever.html.erb') (begins with forward slash)
render :template => 'other_controller/action' -> render('other_controller/action') (same)
render :action => 'hello' -> render('hello') (Does not have any slash)
From Admin::Bar controller:
render('foo/bar') # Renders bar.html.erb of Admin::Foo controller (current namespace)
render :template => 'foo/bar', :namespace => '/' # Renders bar.html.erb of Foo controller from top namespace
Comments and changes to this ticket
-
Repository December 25th, 2008 @ 09:45 PM
(from [061952392afd1dae1aa97a816e9a0c79df7c4514]) Make ActionController#render(string) work as a shortcut for render :file => string. [#1435]
Examples: # Instead of render(:file => '/Users/lifo/home.html.erb') render('/Users/lifo/home.html.erb')
Note : Filename must begin with a forward slash ('/') http://github.com/rails/rails/co...
-
Repository December 25th, 2008 @ 10:37 PM
(from [d67e03871eabb912434dafac3eeb8e6ea7c5585f]) Make ActionController#render(string) work as a shortcut for render :template => string. [#1435]
Examples: # Instead of render(:template => 'controller/action') render('controller/action')
Note : Argument must not begin with a '/', but have at least one '/' http://github.com/rails/rails/co...
-
Repository December 25th, 2008 @ 11:07 PM
(from [cd1d6e8768ae13b11bc343701037b20ad35e6f1e]) Make ActionController#render(string) work as a shortcut for render :action => string. [#1435]
Examples: # Instead of render(:action => 'other_action') render('other_action')
Note : Argument must not have any '/' http://github.com/rails/rails/co...
-
Repository December 26th, 2008 @ 01:13 AM
(from [80307c8b0a889acc7abb7f4e52fd4c02e1063ba8]) Make ActionController#render(symbol) behave same as ActionController#render(string) [#1435] http://github.com/rails/rails/co...
-
DHH January 8th, 2009 @ 09:24 PM
- State changed from new to committed
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 1435 Unify ActionController::Base#render (from [061952392afd1dae1aa97a816e9a0c79df7c4514]) Make Ac...
- 1435 Unify ActionController::Base#render (from [d67e03871eabb912434dafac3eeb8e6ea7c5585f]) Make Ac...
- 1435 Unify ActionController::Base#render (from [cd1d6e8768ae13b11bc343701037b20ad35e6f1e]) Make Ac...
- 1435 Unify ActionController::Base#render (from [80307c8b0a889acc7abb7f4e52fd4c02e1063ba8]) Make Ac...