Class: CmsPostPresenter
- Inherits:
-
BasePresenter
- Object
- BasePresenter
- CmsPostPresenter
- Defined in:
- app/presenters/cms_post_presenter.rb
Instance Method Summary collapse
-
#label_published ⇒ Object
——————————————————————————.
Instance Method Details
#label_published ⇒ Object
6 7 8 9 |
# File 'app/presenters/cms_post_presenter.rb', line 6 def label_published date_formatted = cms_post.published_on.nil? ? 'Draft' : format_datetime(cms_post.published_on) cms_post.is_published? ? h.colored_label(date_formatted, :success) : h.colored_label(date_formatted) end |