I have some code like this:
<% @events.each do |event| %>
But I get a deprecation warning: DEPRECATION WARNING: style block helpers are deprecated. Please use .
When I use <%= @events.each do |event| %>, there is some unwanted output, that is being generated by @events.each. What do I have to do, to get it working correctly and get no deprecation warning?
I have some code like this:
<% @events.each do |event| %>
But I get a deprecation warning: DEPRECATION WARNING: style block helpers
are deprecated. Please use .
When I use <%= @events.each do |event| %>, there is some unwanted output,
that is being generated by @events.each. What do I have to do, to get it
working correctly and get no deprecation warning?
<% @events.each do |event| %> should be fine. Are you sure there isn't
something else on the page generating the deprecation warning?
The deprecation warning is:
DEPRECATION WARNING: style block helpers are deprecated. Please use . (called from _app_views_events_duplicates_show_js_erb___2237124407041796622_2181332520__676939742015288370 at /sites/sampleapp/app/views/events/duplicates/show.js.erb:4)
The deprecation warning is:
DEPRECATION WARNING: style block helpers are deprecated. Please use .
(called from
_app_views_events_duplicates_show_js_erb___2237124407041796622_2181332520__ 676939742015288370
at /sites/sampleapp/app/views/events/duplicates/show.js.erb:4)
Is this definitely the right file? The warning mentions a js.erb file
and then file you've posted looks like just regular erb.