Phil McClure

This one confused the hell out of me. Suddenly, my css styling of the fieldWithErrors div stopped working. Turns out this has been changed to field_with_errors. Check it out here. The change seems to have taken place between beta 3 and beta 4.
Typing long-winded scripts into the irb prompt can be a pain in the ass! It's been annoying me for a while now, so I decided enough was enough. I found a way to run a ruby script (the one which is currently open in vim) through irb, then leave yo...
Worth noting that error_messages_for is not included, by default, in Rails 3. If you check your console server log you'll see this warning:- DEPRECATION WARNING: error_messages_for was removed from Rails and is now available as a plugin. Please i...
I've been having a great time using Compass when working on meetee recently. In particular, I've been making use of the CSS3 mixins. The mixins for Text Shadow, Box Shadow and Gradient have been really useful. No need to worry about any cross-br...
I've been looking for some information on the unobtrusive javascript features in Rails 3, and it turns out that there's not much out there! Either that, or I'm looking in the wrong places. So here is my attempt to explain some of the features. I...
I was just looking into including some Rack middleware in my Rails 3 app. One thing confused me slightly. There seems to be two ways that you can include middleware in you app:- 1. config.ru http://gist.github.com/306481.js?file=config.ru"&...
Came up against this recently when trying to upgrade a Rails app which was using MongoDB. Obviously I didn't want to use ActiveRecord, so I set about removing it. The old way of removing ActiveRecord was to place this line in the environment.rb f...
I had this issue recently when trying to sort items in an EmbeddedDocument. Say you have a "Post" Document and a "Comment" EmbeddedDocument. If you want to sort the comments by the created_at field (which is pretty likely), i...
As you may of heard, I'm working on a new project (meetee), which will allow a more collaborative approach to meetings. Over the last few days I've concentrating my efforts on getting the website design implemented using the following technologies...
Sunspot I had the recent pleasure of using Sunspot, which is powered by Apache Solr, to provide full-text search functionality for a Ruby on Rails recent project. Installation/Configuration Installing Sunspot is reasonably simple. I installed the...