2

Am I correct with the idea below regarding ERB template? any advice would be really appreciated.

Is the embedded ruby syntax with an equal sign "<%= %>" intended to render some output? while the one without the equal sign "<% %>" doesn't.

Sarun Sermsuwan
  • 3,608
  • 5
  • 34
  • 46

1 Answers1

6

When you use <%= %> you render the expression value to your output. While <% %> is simply to write some Ruby code that won't be rendered to final output.

Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292