Module: TagDb
- Defined in:
- lib/tagutils/tags/readers/tag.rb,
lib/tagutils/tags.rb,
lib/tagutils/tags/schema.rb,
lib/tagutils/tags/patterns.rb,
lib/tagutils/tags/models/tag.rb,
lib/tagutils/tags/active_record.rb,
lib/tagutils/tags/models/tagging.rb,
lib/tagutils/tags/models/tag_comp.rb
Overview
use TagUtils - why? why not??
Defined Under Namespace
Modules: ClassMacros, Model Classes: CreateDb, TagReader
Constant Summary collapse
- VERSION =
TagUtils::VERSION
- TAG_KEY_PATTERN =
nb: only allow spaces and underscore inbetween;
do NOT allow digit as first char for now
'\A(?:[a-z]|[a-z][a-z0-9_ ]*[a-z0-9])\z'
- TAG_KEY_PATTERN_MESSAGE =
"expected one or more lowercase letters a-z or 0-9 digits or space or underscore /#{TAG_KEY_PATTERN}/"
- Models =
add convenience module alias in plural
e.g. lets you use include TagDb::Models
Model
Class Method Summary collapse
- .create ⇒ Object
-
.delete! ⇒ Object
delete ALL records (use with care!).
- .tables ⇒ Object
Class Method Details
.create ⇒ Object
17 18 19 20 |
# 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 |