开发者

Rails templates documentation

开发者_如何学PythonI 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.


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 %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜