Depracation warning style block helpers

Hi,

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?

Regards
sewid

Hi,

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?

Fred

Hi,

I’m pretty sure. The hole code is: https://gist.github.com/831041

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)

Regards,
sewid

The depracated warning is caused by your url_for I would guess.

Can’t test it because my development machine crashed yesterday

Top posted from android

What would be the correct url_for syntax?

Regards,
sewid

Hi,

I'm pretty sure. The hole code is:https://gist.github.com/831041

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.

Fred

Hi,

yes, it’s definitely the right file. It’s a js-request, that uses the returned code to fill a div.

Regards
sewid