
For a little while now I want to plot my own GPS logs (like my last cycling trip). I am obsessed with geolocation. Sure, you can use Google Maps, the default weapon of choice these days. With their API you can plot your track log on top of their maps and satellite images. You don't even have to program that, Google Maps can render KML files out of the box and there are tons of tools out ther...
I'm new to testing and documentation for the built-in Rails testing seems scarce so I'll write down what I learn in the process... there may be - and probably are - better ways to do this. Submitting a form in a test In a functional test you test the controller. A controller is responsible for the incoming requests and the response with a rendered view. If you want to test the creation of...
I played with the latest Rails 3 beta release today (version 3.0.0.beta4) and noticed the following depreciation warning: DEPRECATION WARNING: form.error_messages was removed from Rails and is now available as a plugin. After Googling around some I found out why. Apparently the old error_messages_for violated the core Rails principles of never dictating the look and feel of an application...
Suppose you have a ‘families’ table in your database with a ‘husband’ and ‘wife’ column. You add a a composite key so that the combination husband and wife is unique. You certainly don't want another record with the same husband and wife combination. At the database level your migration could look like this: add_index :families, [:husband, :wife], :unique ...
I needed to randomly sort the elements in an array in the Ruby on Rails project I'm working on. Turns out these things are just way too easy in Ruby: [1, 2, 3].shuffle >> [3, 1, 2] Credits to Tom Klaasen for improving the more complex snippet I found before. Or you can use the rand method when you only need one single element and don't need to shuffle the whole array: ...
| Building a 64-bit prefpane | Feb 4th |
| How many days in a month | Jan 31st |
| Multi size default images with paperclip | Jan 9th |
| Sync data with Dropbox | Nov 18th |
| RuPy 2009 roundup | Nov 12th |
| Belgian iPhone & iPad apps | Sep 4th |
| Rails Rumble reflections | Aug 25th |
| Moving my ISP: from Telenet to Dommel | Aug 8th |
| Favorite iPhone apps | Jul 16th |
| Updating bundles with Sparkle | Jun 4th |
| archive → | |
I am just an ordinary 28 years old guy who likes the web. Living in Leuven, Belgium, studying and working in IT.