Class: Kawara::Article
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Kawara::Article
- Extended by:
- FriendlyId
- Defined in:
- app/models/kawara/article.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.find_from_published(id) ⇒ Object
26 27 28 |
# File 'app/models/kawara/article.rb', line 26 def self.find_from_published(id) friendly.published.find(id) end |
Instance Method Details
#html_content(auto_ids: true) ⇒ Object
30 31 32 |
# File 'app/models/kawara/article.rb', line 30 def html_content(auto_ids: true) Kramdown::Document.new(content, auto_ids: auto_ids).to_html end |