lib/joint.rb in joint-0.1 vs lib/joint.rb in joint-0.1.1
- old
+ new
@@ -32,22 +32,18 @@
self["#{name}_type"] = Wand.wave(file.path)
self["#{name}_name"] = Joint.file_name(file)
attachment_assignments[name] = file
end
end
-
- def grid
- @grid ||= Mongo::Grid.new(database)
- end
end
module InstanceMethods
def attachment_assignments
@attachment_assignments ||= {}
end
def grid
- self.class.grid
+ @grid ||= Mongo::Grid.new(database)
end
private
def save_attachments
attachment_assignments.each do |attachment|