Skip to content

Commit

Permalink
use the error handling built into fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronLasseigne committed Feb 9, 2014
1 parent cc1c1bb commit 3ad7e2c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/active_interaction/filter.rb
Expand Up @@ -49,9 +49,7 @@ class << self
#
# @see .slug
def factory(slug)
CLASSES.fetch(slug)
rescue KeyError
raise MissingFilterError, slug.inspect
CLASSES.fetch(slug) { fail MissingFilterError, slug.inspect }
end

# Convert the class name into a short symbol.
Expand Down

0 comments on commit 3ad7e2c

Please sign in to comment.