It looks like this sort of thing is built into Rails 4.1: http://edgeguides.rubyonrails.org/4_1_release_notes.html#message-verifiers