Class: CommentPresenter
- Inherits:
-
BasePresenter
- Object
- BasePresenter
- CommentPresenter
- Defined in:
- app/presenters/comment_presenter.rb
Instance Method Summary collapse
-
#author ⇒ Object
——————————————————————————.
-
#date_posted ⇒ Object
——————————————————————————.
-
#formatted_comment ⇒ Object
——————————————————————————.
Methods inherited from BasePresenter
Methods included from DmCore::LiquidHelper
#liquidize_html, #liquidize_markdown, #liquidize_textile, #markdown, #sanitize_text
Constructor Details
This class inherits a constructor from BasePresenter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BasePresenter
Instance Method Details
#author ⇒ Object
16 17 18 |
# File 'app/presenters/comment_presenter.rb', line 16 def comment.user.nil? ? 'Anonymous' : comment.user.display_name end |
#date_posted ⇒ Object
11 12 13 |
# File 'app/presenters/comment_presenter.rb', line 11 def date_posted format_datetime comment.created_at end |
#formatted_comment ⇒ Object
6 7 8 |
# File 'app/presenters/comment_presenter.rb', line 6 def formatted_comment markdown(comment.body, :safe => true) end |