2

I'm looking at legacy code that has all erb interpolations with <%== ... And I've never used that before.

What is it for? What does it do differently from <%= ?

Matt
  • 13,948
  • 6
  • 44
  • 68
Aldric
  • 59
  • 4

1 Answers1

16

It's shorthand to output raw content.

see https://stackoverflow.com/a/5533614/2128691

<%== @content.body %>

Is exactly the same as

<%= raw @content.body %>

Community
  • 1
  • 1
dax
  • 10,779
  • 8
  • 51
  • 86