How to clear an elasticsearch index
In the event you need to tear down your elasticsearch index, there is a web API that you can take advantage of to make this fairly straight forward.
Go Team, Go!
Last year some friends and I took part in a charity event to raise funds for Maggie’s Cancer Centres. This was no ordinary event, this was Maggie’s Monster Bike and Hike, a 24 hour challenge to travel as far as you can between Fort William and Inverness which is about 71 miles.
The future of Ruby
I am not a very old-school Rubyist. My involvement dates from 2005 when I, along with many of my Extreme Programming (XP) colleagues, joined the Great Rails Bandwagon. It is telling that so many of the people who became involved around that time were from the Agile/XP community. We were sick of the mountains of glue code and XML configuration that stood in the way of us getting things done in Enterprise Java.
My Sublime Text 2 Config
Sublime Text 2 has been my editor of choice for about a year now. It's a great piece of software, but gradually I've been adding my own config options to make it just that little bit nicer for working with on a daily basis. I like it, and the guys in the office like it enough that it's the default config on our pairing machines at the moment.
Rails 3: Validation Reflection
A recent addition to `ActiveModel` is the introduction of a couple of methods for validation reflection.
Rails 3: HTML Escaping
So you've been working on Rails apps for a while, and like all good developers, you've been escaping any content rendered in your views that your application's users might have entered, right?
Rails 3: Add validations to non-ActiveRecord::Base models
Prior to Rails 3, if you wanted to add validations to models which didn't inherit from `ActiveRecord::Base`, you'd probably resort to using a gem/plugin that re-implements much of the behaviour or has some dirty hooks into the ActiveRecord private API.
Rails 3: Routing Examples
Rails 3 introduced a new routing DSL that is a little bit different from the Rails 2 version. This quick guide covers a few examples of the new routes, and how they compare to Rails 2.