Forum: Ruby on Rails Rationale behind render opposed to render_action

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
John W. (Guest)
on 2006-01-19 20:37

What was the rationale behind moving to the swiss army-ish method of
render(:X), as opposed to the various render_X methods that existed

I find it easier to keep the render_X style in my brain, rather than
trying to remember what the valid parameters to render() are. It's also
more code completion friendly.

Just curious.

Will B. (Guest)
on 2006-01-19 21:04
(Received via mailing list)
I dunno, I don't find it that much more difficult...  if you used to do
render_text "Hi there", you just split out the part after "render_" as a
separate parameter..

i.e., render :text => 'Hi there"

render_controller "myController" changes to render :controller =>
"myController".  I find the new method more intuitive and extensible,
that's just the opinions of a relative Rails newbie.

This topic is locked and can not be replied to.