Category Archives: Uncategorized

Använd HTML5 data attribut och delayed loading av bilder för snabbare laddning

Om man har väldigt många bilder som laddas från externa tjänster på en webbsida så kan man inte alltid vara säker på att den externa tjänsten svarar så snabbt som man vill. Då även antalet bilder på sidan slöar ner … Continue reading

Posted by Joakim Westerlund View Comments Posted in Front End, Javascript, Uncategorized, jQuery Tagged , , , , , ,

Rails Gotcha: Mocking/Stubbing on an Associated ActiveRecord Object

In RSpec it is still not possible to have mocks or stubs on all instances of a class, although this has been suggested and it is a feature of the Mocha framework. Stubbing or mocking an object returned by an … Continue reading

Posted by peter View Comments Posted in Uncategorized

Rails Tip: Safe Usage of URI.parse

As documented already by Doug URI.parse will thrown an exception if your URL has a trailing space. It also throws an exception on invalid URLs in general. To avoid having URI.parse bomb on your pages you can use a construct … Continue reading

Posted by peter View Comments Posted in Uncategorized

acts_as_bitfield Plugin now Radio Button Compatible

I’ve patched the acts_as_bitfield plugin to recognize “true” as true so that now instead of having to write: <%= f.radio_button(:email_activated, true, :checked => (“checked” if @item.email_activated?)) %> Yes <%= f.radio_button(:email_activated, false, :checked => (“checked” unless @item.email_activated?)) %> No you can … Continue reading

Posted by peter View Comments Posted in Ruby on Rails, Uncategorized

Committing to Rails Core

In our last post we talked about upgrading to Rails 2.3, and the issues we encountered. One bug we found was that multiple POST requests issued in a test didn’t reset the post parameters between requests. The patch Peter submitted … Continue reading

Posted by Richard View Comments Posted in Uncategorized

A short introduction.

Welcome to the blog! I thought it would be appropriate to shortly present Newsdesk in a post before anything else. If you don’t know about us (and chances are small you do, unless you’re living in Sweden), we are a … Continue reading

Posted by Richard View Comments Posted in Uncategorized Tagged , , , , , , , , ,