ruby on rails - How to write "<%" in a erb file -


I have a .erb file, where I would like to return the following text:

The name & lt ;% R>

When I present this file, ARB interprets & lt;% as Ruby code and% does not render the signal.

I have a method like this, putting% signals in the string like this:

  name & lt; & Lt;% = "%"% & gt; R & gt;  

But this is very ugly.

I believe that you are looking for double percents

  & lt; %% R% & gt;  

It is used extensively using ARB templates to generate an ARB template.

Update

  & lt; %% R & gt;  

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -