On Wed, Nov 3, 2010 at 11:37 AM, Lille <[email protected]> wrote:

> Hi,
>
> I've written all my view templates in erb, but now I need to convert
> them to straight html so that designers can work with them. How do I
> do this?
>
>
If you want to give your designer a bit of freadom without them needing to
know erb/ruby use liquid

http://www.liquidmarkup.org/

check what it is in this screencast

http://railscasts.com/episodes/118-liquid

basically is

"Ruby library for rendering safe templates which cannot affect the security
of the server they are rendered on."

and looks like this

<ul id="products">
      {% for product in products %}
        <li>
          <h2>{{product.title}}</h2>
          Only {{product.price | format_as_money }}

          <p>{{product.description | prettyprint | truncate: 200  }}</p>

        </li>
      {% endfor %}
    </ul>

With this you can define a small set of variables or methods that they can
access and so you can give them a small "dictionary" telling them for
example that inthe product page they can use a variable called product that
has x attributes.

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

Reply via email to