emberjs/ember.js — pull request #4208 by rjackson (2014-01-23 01:57:02+00:00)
Title: [BUGFIX beta] Provide helpful error even if Model isn't found.

Previously, you would receive an error if no model was found corresponding to
the route name that you are in. We were already providing a nice assertion
(which lets the user know that the model hook wasn't defined and can't be
inferred), but immediately have that we would throw an error because we were
still calling `find` on a non-existent model factory.

This simply short curcuits the `find` call if `modelClass` isn't found.

Resolves #4109.