Class: ConfDb::Model::Prop
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ConfDb::Model::Prop
- Defined in:
- lib/props/activerecord/models.rb
Class Method Summary collapse
-
.create_from_fixture!(name, path) ⇒ Object
todo/fix: move create_from_fixture! method to textutils ??? - why? why not? yes - move to textutils! - fixture concept/notion is part of textutils.
Class Method Details
.create_from_fixture!(name, path) ⇒ Object
todo/fix: move create_from_fixture! method to textutils ??? - why? why not? yes - move to textutils! - fixture concept/notion is part of textutils
12 13 14 15 16 17 18 |
# File 'lib/props/activerecord/models.rb', line 12 def self.create_from_fixture!( name, path ) key = "db.#{fixture_name_to_prop_key(name)}.version" value = "txt.#{File.mtime(path).strftime('%Y.%m.%d')}" Prop.create!( key: key, value: value ) end |