Sha256: 4aca70635b3abbcb4d1112716cdb3abd6a2a3cd6420e7fa17509319f337bd744
Contents?: true
Size: 825 Bytes
Versions: 15
Compression:
Stored size: 825 Bytes
Contents
# encoding: utf-8 module BeerDb class Stats include Models def tables puts "Stats:" puts " #{'%5d' % Beer.count} beers" puts " #{'%5d' % Brand.count} brands" puts " #{'%5d' % Brewery.count} breweries" puts ### fix: use if defined? BeerDbNote or similar or/and check if table exist ?? ### or move to beerdb-note ?? # puts " #{'%5d' % User.count} users" # db model extension - move to its own addon? # puts " #{'%5d' % Bookmark.count} bookmarks" # db model extension - move to its own addon? # puts " #{'%5d' % Drink.count} drinks" # db model extension - move to its own addon? # puts " #{'%5d' % Note.count} notes" # db model extension - move to its own addon? end end # class Stats end # module BeerDb
Version data entries
15 entries across 15 versions & 2 rubygems