Ruby on Rails Thursday, November 25, 2010

Yes, you would better read about that.
But I will answer, in partial you would be able to access to the item by accessing variable named by the name of the partial, in your case "form"

On Thu, Nov 25, 2010 at 2:03 PM, Colin Law <clanlaw@googlemail.com> wrote:
On 25 November 2010 11:59, Vineeth Pradhan <lists@ruby-forum.com> wrote:
> Hello,
>
> How does the "render :partial => '/comment/form',
> :collection=>@blog.comments" work? What object does this pass to the
> partial view? How do I access the comment object in partial view?

Have a look at the Rails Guide on Layouts and Rendering.  It should
get you started at least.

Colin

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.




--
С уважением,

Виталий Янчук
http://www.vitalik.com.ua/

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment