Forum: Ruby on Rails SSI like function in Rails?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Daniel (Guest)
on 2006-02-25 13:46

Im slowly learning ruby and rails... still having some problems with
grasping the basic concepts though.

How do I include a common html snippet in some of my views? (The snippet
exists in two different flavors, I want to include either one depending
on what type of user (admin/others) is requesting the page)

I have tried the normal SSI include tags, but my WEBrick server cant
handle them properly (at all).

// Daniel
James A. (Guest)
on 2006-02-25 13:54
(Received via mailing list)
You want to learn about 'partials'


  <h1>My Great Site!</h1>


  <%= render_partial 'shared/header' %>

.... basically like that.

- james

On 2/25/06, Daniel <removed_email_address@domain.invalid> wrote:
> handle them properly (at all).
> // Daniel
> --
> Posted via
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid

* J *
Daniel (Guest)
on 2006-02-25 13:58
Great, thank you very much!

// Daniel
This topic is locked and can not be replied to.