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:

On 27 Kwi, 22:31, Irene S. [email protected]

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 E. 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.

On Apr 28, 12:00 am, Irene S. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs