Permalink
Browse files

Fix crash when rendering empty collections

E.g. `render @post.comments` when `@post.comments` is empty.
  • Loading branch information...
1 parent dd7fdc0 commit 17c5bfd3ce06c0f44e6feccb774436ddef9f3dc1 @hinrik hinrik committed Mar 27, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/rails_view_annotator/action_view/partial_renderer.rb
@@ -6,6 +6,7 @@ def self.augment_partial_renderer klass
render = klass.instance_method :render
klass.send(:define_method, :render) do |*args|
inner = render.bind(self).call(*args)
+ return unless identifier
short_identifier = Pathname.new(identifier).relative_path_from Rails.root
backtrace = nil

0 comments on commit 17c5bfd

Please sign in to comment.