module TagDb
use TagUtils
- why? why not??
Constants
- Models
add convenience module alias in plural
e.g. lets you use include TagDb::Models
- TAG_KEY_PATTERN
nb: only allow spaces and underscore inbetween;
do NOT allow digit as first char for now
- TAG_KEY_PATTERN_MESSAGE
- VERSION
Public Class Methods
create()
click to toggle source
# File lib/tagutils/tags.rb, line 17 def self.create CreateDb.new.up ConfDb::Model::Prop.create!( key: 'db.schema.tag.version', value: VERSION ) end
delete!()
click to toggle source
delete ALL records (use with care!)
# File lib/tagutils/tags.rb, line 23 def self.delete! puts '*** deleting tag/tagging table records/data...' Model::Tagging.delete_all Model::Tag.delete_all end
tables()
click to toggle source
# File lib/tagutils/tags.rb, line 29 def self.tables puts " #{Model::Tag.count} tags" puts " #{Model::Tagging.count} taggings" end