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. Thanks -- Prasad http://roorky.com Digital Interactive Publication -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

