Tuesday, March 16, 2010

Rails render :partial tip

render :partial => "p", :locals => { :x => 1 }
can now be written as render "p", :x => 1

1 comment:

  1. This shorter way seems to be only possible inside the view and not from within the controller.

    ReplyDelete