Class: BeerDb::Deleter

Inherits:
Object
  • Object
show all
Includes:
Models
Defined in:
lib/beerdb/deleter.rb

Instance Method Summary collapse

Instance Method Details

#runObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/beerdb/deleter.rb', line 9

def run
  # for now delete all tables

  ### fix: use if defined? BeerDbNote or similar or/and check if table exist ??
  ###      or move to beerdb-note ??

  ## Bookmark.delete_all   # db model extension - move to its own addon?
  ## Drink.delete_all      # db model extension - move to its own addon?
  ## Note.delete_all       # db model extension - move to its own addon?
  ## User.delete_all       # db model extension - move to its own addon?

  Beer.delete_all
  Brand.delete_all
  Brewery.delete_all
end