Hi All,
In Ryan Bates screencast episode 80 (http://railscasts.com/episodes/
80) on simplifying views in rails he mentions that
<% render :partial =>''product'' , :collection =>
@products %> and <%
render :partial =>''product'' , :object => @product %>
can now be written as
<%= render :partial => @products %> and <%= render :partial =>
@product %> respectively.
He also says that <%form_for :product, :url -> products_path do |f|
%> and <%form_for :product, :url =>product_path(@product), :html =>
{:method => ''put''} do |f| %>
can now both be written
<% form_for @product do |f| %>
Can anyone tell me where this is documented since the api only
mentions the old ways as far as I can see unless I am looking in the
wrong place.
Many thanks
Anthony
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---