Sha256: 9d102d608af8ce11cafa8b91a8c2017fd79743dedcfcf28de10edf9e38657ae7
Contents?: true
Size: 366 Bytes
Versions: 44
Compression:
Stored size: 366 Bytes
Contents
class Application get '/receipts' do json Receipt.recent.includes(:document).as_json( :only => [:id, :printer, :keyword, :created_at, :printed], :methods => :document_title ) end post '/receipts/print' do receipts = Receipt.where(:printed => false) receipts.each{|x| x.print} json receipts.as_json(:only => [:id, :printed]) end end
Version data entries
44 entries across 44 versions & 1 rubygems