Saturday, September 18, 2010

Re: [Rails] Commenting in an ERB without generating a compiling error

> <% @projects.each do |project| %>
> <tr>
> .
> <td><%= link_to 'Destroy', project, :confirm => 'Are you
> sure?', :method => :delete %></td>
> .
> </tr>
> <% end %>
>
>
> How can I safely comment out the TD line above? Do I have to use the
> =begin way?

If you don't mind HTML comments, just wrap it in <!-- ..... ->

If you just want the link gone, but keep the <td> you can make the start tag look like <%#= and it should work (if memory serves).

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate