Class: Txtblx::Textblock
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Txtblx::Textblock
- Defined in:
- app/models/txtblx/textblock.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.by_key(key) ⇒ Object
20 21 22 |
# File 'app/models/txtblx/textblock.rb', line 20 def self.by_key(key) Textblock.published.find_by_key(key) end |
Instance Method Details
#publish ⇒ Object
8 9 10 |
# File 'app/models/txtblx/textblock.rb', line 8 def publish snapshot!(tag: :published) end |
#to_param ⇒ Object
16 17 18 |
# File 'app/models/txtblx/textblock.rb', line 16 def to_param perma_id.to_s end |