Validation assertion added to test_spec_on_rails

I’ve added a new assertion to test_spec_on_rails that enables verification that validates_presence_of is being called correctly on your ActiveRecord models. For example, say you have a model like this: class User < ActiveRecord::Base validates_presence_of :first_name, :last_name end You would typically test this validation by leaving a field blank, calling valid? … Continue reading

Contra dancing

I went contra dancing with some friends last Friday. I’ve done English country dancing before, but never contra. It’s quite a workout, but really fun. Our friends were kind enough to post this video from the event:

raleigh.rb has a podcast

Did you realize that Raleigh’s own Ruby Brigade now has a podcast? Yes ladies and gents, it’s true. I’ve been recording the last few meetups on my MacBook. The audio quality isn’t half bad. I hope to expand the podcast in the future with non-meetup content. For now, it can … Continue reading

Using named routes in Streamlined addition files

For you Streamlined users out there, here’s an easy way to include named routes in your Streamlined addition modules. Previously, you had to hard code the URLs like so: module OrderAdditions def name_link link_to user.name, “/users/show/#{user.id}” end end Order.class_eval do include OrderAdditions include ActionView::Helpers::UrlHelper include ActionView::Helpers::TagHelper end Streamlined.ui_for(Order) do list_columns … Continue reading