Class: Kawara::Article

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/kawara/article.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find_from_published(id) ⇒ Object



17
18
19
# File 'app/models/kawara/article.rb', line 17

def self.find_from_published(id)
  published.find(id)
end

Instance Method Details

#html_content(auto_ids: true) ⇒ Object



21
22
23
# File 'app/models/kawara/article.rb', line 21

def html_content(auto_ids: true)
  Kramdown::Document.new(content, auto_ids: auto_ids).to_html
end