Forum: Ruby on Rails Rationale behind render opposed to render_action

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F8fd54072606eaf5603484e756672034?d=identicon&s=25 John Wells (Guest)
on 2006-01-19 19:37
Guys,

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
before?

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.

Thanks,
John
9b7647d55df4584d7031130915556040?d=identicon&s=25 Will Briggs (Guest)
on 2006-01-19 20: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,
but
that's just the opinions of a relative Rails newbie.

-Will
This topic is locked and can not be replied to.