what is a partial

I am a newbie.

What is a "partial" in the web world? I have seen code like render
:partial and I am at a loss as to what it means.

partial is a snippet of code, like a button or an other element of
page, which is pasted just like SMARTY tag :slight_smile:

I don't know about in the web world but in the Rails world, a partial is
a small reusable view segment. Think of them like methods but for the
view. So, you can extract partials (chunks of view code) and then render
them in a template.

Nathan Esquenazi wrote:

I don't know about in the web world but in the Rails world, a partial is
a small reusable view segment. Think of them like methods but for the
view. So, you can extract partials (chunks of view code) and then render
them in a template.

THanks Nathan for the explanation. It helped in my understanding.

It should be pointed out that a partial need not necessarily be used
just for outputting HTML markup. Just about all of your various Ajax
support methods make some use of partials for generating XML,
JavaScript, JSON, etc.