Skip to content

Commit

Permalink
avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Dec 2, 2011
1 parent 9d9d2a5 commit 591bed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_decorator/decorator.rb
Expand Up @@ -19,7 +19,7 @@ def to_a_with_decorator
end

def self.decorate_all(models)
return if models.empty?
return models if models.empty?
decorator_name = "#{models.first.class.name}Decorator"
k = decorator_name.constantize
models.each do |m|
Expand Down

0 comments on commit 591bed3

Please sign in to comment.