lib/jackfs/adapters/db_adapter.rb in jackfs-0.0.2 vs lib/jackfs/adapters/db_adapter.rb in jackfs-0.0.3

- old
+ new

@@ -28,10 +28,15 @@ FileUtils.remove_file(File.join(temp_file_path,'/*'), true) end def store(f, name) body = Base64.encode64(f.read) - data << { :name => name, :body => body, :created_at => Time.now, :updated_at => Time.now } + data.insert( + :name => name, + :body => body, + :created_at => Time.now, + :updated_at => Time.now + ) end def get(name) record = data.where(:name => name).order(:name).first unique_name = UUIDTools::UUID.random_create.to_s