Easy partials
Following code has been tested with Rails 2.3 .
Traditional way of rendering partials.
render :partial => 'comments/comment', :locals => { :comment => comment, :show_article_title => false}
Above code can also be written as
render 'comments/comment', :comment => comment, :show_article_title => false
One more example.
render :partial => 'comment', :locals => { :comment => comment, :show_article_title => true }
render 'comment', :comment => comment, :show_article_title => true
I continue to see everyone use the version with keyword ‘partial’.
This change captures a bit of what I am talking about.
- Add new comment
- 108 reads
- Feed: neeraj.name
- Original article


Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago