radar/forem — pull request #471 by kekiefer (2013-09-10 03:59:50+00:00)
Title: FriendlyId 5 compatible finders -- restore FriendlyId 4-style finders by...

... using the :finders addon

From the FiendlyId 5 docs (rails 4) --
> Finders are no longer overridden by default. If you want to do friendly finds, you must do Model.friendly.find rather than Model.find. You can however restore FriendlyId 4-style finders by using the :finders addon:
>
> friendly_id :foo, use: :slugged # you must do MyClass.friendly.find('bar')
> # or...
> friendly_id :foo, use: [:slugged, :finders] # you can now do MyClass.find('bar')

This commit enables the :finders addon, fixing problems with finder errors (https://github.com/radar/forem/issues/470), e.g.:

ActiveRecord::RecordNotFound in Forem::ForumsController#show
Couldn't find Forem::Forum with id=default