ceth
ceth

Reputation: 45295

Rails templates documentation

I cannot find rails template documentation. Where can I find it?

In my case I search for 'if'-keyword syntax, but I will be thankful if you show me where I can find this type of information.

Upvotes: 1

Views: 177

Answers (1)

Kelly
Kelly

Reputation: 41541

Are you looking for basic info of how to do ERB? If so, here are some samples on the ruby-doc site.

Here's an example of an if-statement in ERB:

      <% if @cost < 10 %>
        <b>Only <%= @cost %>!!!</b>
      <% else %>
         Call for a price, today!
      <% end %>

Upvotes: 1

Related Questions