Posted by flyerhzm on December 12, 2010
Like the simplify render in views, from rails 2.3, we can also simplify render in controllers.
Like simplify render in views, from rails 2.3, we can also simplify render in controllers. Here I will show you the contrast.
Rendering an Action's View
render :action => :edit render :action => 'edit'
render :edit render 'edit'
Rendering an Action’s Template from Another Controller
render :template => 'books/edit'
Rendering an Arbitrary File
render :file => '/path/to/rails/app/views/books/edit'