render partials

render(:partial => article, : object => @new_article)
1) the :partial value does not have a prefix underscore; even the file name does
:partial => shared/header
look for app/views/shared/_header.html.erb
2) the value of : object is @new_article, and this value is assgined to the local variable in the partial with the same name as the template, which, here, is article;
so you can use article.title in the partial temple, which has the same value as @new_article.title

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s