Sha256: d196a90efbd6967acc0df54222b214e2315c32b38a2ac640ea1e37350af9e1c1
Contents?: true
Size: 597 Bytes
Versions: 9
Compression:
Stored size: 597 Bytes
Contents
module Picky module Sinatra module IndexActions def self.extended base base.post '/' do index_name = params['index'] index = Picky::Indexes[index_name.to_sym] data = params['data'] index.replace_from Yajl::Parser.parse(data) if data end base.delete '/' do index_name = params['index'] index = Picky::Indexes[index_name.to_sym] data = Yajl::Parser.parse params['data'] id = data['id'] index.remove id if id end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems