TalentBox/sequel-rails — pull request #4 by binarypaladin (2012-06-18 16:11:26+00:00)
Title: Rails model plugin

Hey. I went back and forth with Jeremy Evans and added a model plugin. I just wanted to make sure I was following an accepted protocol for my naming conventions.

It adds a .find! method to Sequel which functions just like [] only it raises an exception if a record is not found like AR's .find method. The sequel-rails gem has been modified in two ways:

1. It will rescue the exception with a 404 just like RecordNotFound.

2. The scaffold generator uses the new .find! method instead of [].

This branch includes the improved-generators branch.