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

On Feb 16, 8:29pm, “S. Widmann” [email protected] wrote:

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

Am 17.02.2011 06:30 schrieb “S. Widmann” [email protected]:

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


You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

On Feb 17, 5:30am, “S. Widmann” [email protected] wrote:

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

What would be the correct url_for syntax?

Regards,
sewid

Hi,

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

Regards
sewid

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs