Friday, 29 April 2011

Rails partials ,layout and helpers

partials:
We can think of Rails partial templates (partials for short) as a kind of method
for views. A partial is simply a chunk of a view in its own separate file. You can
invoke (render) a partial from another template or from a controller, and the
partial will render itself and return the results of that rendering. And, just as
with methods, you can pass parameters to a partial, so the same partial can
render different results.


render(:partial => "partialFile")

No comments:

Post a Comment