Skip to content

Commit

Permalink
don't decorate NilClass
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Dec 16, 2011
1 parent 7f70448 commit 3a9b5e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/active_decorator/decorator.rb
Expand Up @@ -10,6 +10,8 @@ def initialize
end

def decorate(obj)
return if obj.nil?

case obj
when Array
obj.each do |r|
Expand Down

0 comments on commit 3a9b5e3

Please sign in to comment.