Commit 9a3f9f8b by Scott Carleton Committed by Jon Yurek

traverse ancestors to find definitions

parent daefa873
......@@ -51,7 +51,9 @@ module Paperclip
end
def definitions_for(klass)
@attachments[klass]
klass.ancestors.each_with_object({}) do |k, obj|
obj.merge! @attachments[k]
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment