Class: Hitchens::PostDecorator
- Inherits:
-
ApplicationDecorator
- Object
- Draper::Base
- ApplicationDecorator
- Hitchens::PostDecorator
- Defined in:
- app/decorators/hitchens/post_decorator.rb
Instance Method Summary collapse
Methods inherited from ApplicationDecorator
Instance Method Details
#body_to_html ⇒ Object
5 6 7 8 |
# File 'app/decorators/hitchens/post_decorator.rb', line 5 def body_to_html html = markdown(body) syntax_highlight(html).html_safe end |
#pubdate_tag ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/decorators/hitchens/post_decorator.rb', line 10 def pubdate_tag if publication_date h.time_tag publication_date, pubdate_display, pubdate: true else "(not yet published)" end end |