Wow! Ruby on Rails just grew up.

I’ve been using Ruby on Rails at SonicIQ since the early Rails betas and have worked exclusively with Ruby frameworks ever since. Over the past few years I’ve seen Rails evolve, which has been a painful process in some cases as it has found direction, making the odd mistake along the way.
I have been working on a new project, getting a proper chance to use the Rails 3 beta and wow! …Rails just grew up.
With the introduction of Bundler, the gem dependency pain has disappeared. ActiveRecord’s API feels solid with the introduction of ActiveRelation. The new routing API (with the introduction of ActionDispatch) is amazingly concise, my routes never looked so good. The close integration with Rack enabling the mounting of other rack applications in a Rails app is just too easy… I could go on…
I think a great deal of the modularity and general solidness comes from the Merb merger, so big thanks to the Merb guys. I have felt none of the pain that I had in the past when needing to use anything other than the defaults, or hooking into the framework itself.
What more can I say, I’m in love with Rails all over again and so glad I stuck with it.
Thanks to everyone involved.

No 'a:visited' in Safari 5… jQuery to the rescue?

With the release of Safari 5, it seems that the ‘:visited’ CSS pseudo selector no longer takes affect. I completely understand it being removed due to breadcrumb sniffing but from a user’s perspective, differentiating between links that you have visited and those that you have not is very handy.

jQuery to the rescue

Using jQuery, we can easily add this functionality back in, without the XSS problems associated with the browser handling it.


$('a:not(.visited)').click(function() {
  $(this).addClass('visited');
});

You can then go ahead and set a different style for links that have the ‘visited’ class.
The problem with this approach is that it will only work for links opened in a separate window or tab and not persist when you leave the current page, as all added classes will obviously be removed. There is probably a way to store a list of which links have been visited in a cookie, however each link would need a unique identifier… something for another time.

Update

It seems that the ‘:visited’ selector does work in some cases in Safari 5 but not sure of the circumstances, can anyone shed any light on this?