Aashish Kiran wrote:
I am new to rails. can anyone explain in detail about partials in rails.
my rails version is 2.3.4.
How to use them?
You can think of partials as making function calls from your erb files
which generates templated html for you. The values for template
variables you can pass through local and object variables. If you want
same set of templated html to be generated from N places in your site,
you can create a partial and call this from all of these N places. Any
time you want to change the code you change in one place rather than N
places. It helps you to follow DRY principle.
Digital Interactive Publication