Some writing by Trek

& archive, twitter, github

Javascript ousted from Rails views

by Trek on

I've been warning people for a time now that Rails' javascript helpers (you know, those helpers that write inline javascript directly into your view) wouldn't make the cut long beyond Rails 2.2. The we less-than-three unobtrusive javascript folks have griping about them for years.

The topic just came up again on the Rails core mailing list

"Rails should never really generate any JS for these helpers. Just decorate them with the proper class names/attributes. Then every JS library can write a driver that'll look for these Rails specific clues and wire them up." - DHH

So, if you're using helpers like this, start working them out. I've talked before about ditching trivial helpers and patterns to make helpers work sans inline javascript

blog comments powered by Disqus