How do I comment out ERB in Rails? [duplicate]


I understand that commenting in rails is done with '#' but if I try to comment out ERB tags, I always run into problems

 <%= link_to "Make default", make_default_admin_state_path(state) %>

Where would you put the '#' on this code?

I tried to put it outside the <% and it did nothing. when I put it inside, there was an error message


Answers:


<%#= link_to "Make default", make_default_admin_state_path(state) %>

<%# %> is an ERB comment: the dangling = makes no difference, and can be left in.