Reputation: 8397
I'm just getting started with Ruby and Ruby on Rails, so excuse me if this is a simple question. I've noticed that in some ERB files, there is a difference to using <%= %>
and <% %>
, but what is the difference?
Thanks!
Upvotes: 1
Views: 446
Reputation: 6068
The difference is as follows:- <%= %> would execute and print the value of rails code written inside and <% %> would just execute the rails code.
Thanks, Anubhaw
Upvotes: 5