This project is archived and is in readonly mode.
Rails3 ActionView erroneous deprecation warnings
Reported by James B. Byrne | October 26th, 2010 @ 05:29 PM
DEPRECATION WARNING: <% %> style block helpers are deprecated. Please use <%= %>. (called from app_views_customs_shipment_pars_checks_new_html_erb__256117305_23535140524620_0 at ./app/views/customs_shipment_pars_checks/new.html.erb:8)
code:
8 <%- content_tag :h2, :header do -%>
9 <%=h(yield(:page_title))-%>
10 <%- end -%>
The deprecation warning with its recommendation to change the code to <%= is decidedly wrong. Doing so leads immediately to a syntax error. I am not sure what this message is meant to accomplish.
Comments and changes to this ticket
-
Denis Odorcic October 26th, 2010 @ 11:11 PM
Setting
<%- content_tag :h2, :header do -%>
<%= content_tag :h2, :header do -%>
-
James B. Byrne October 27th, 2010 @ 04:09 PM
You are right. I must have added the = to the end statement as well.
-
Aditya Sanghi October 28th, 2010 @ 07:44 AM
- State changed from new to invalid
- Importance changed from to Low
If the error was not the one mentioned in the above comment, kindly comment to re-open ticket.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>