diff options
Diffstat (limited to 'app/helpers/content_helper.rb')
| -rw-r--r-- | app/helpers/content_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 6bb9c4e0..fd351ed2 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb | |||
| @@ -59,10 +59,14 @@ module ContentHelper | |||
| 59 | 59 | ||
| 60 | # Returns the published_at attribute of a page if it is not nil, otherwise | 60 | # Returns the published_at attribute of a page if it is not nil, otherwise |
| 61 | # it returns the auto-filled value of the created_at attribute | 61 | # it returns the auto-filled value of the created_at attribute |
| 62 | def date_for_page page | 62 | def date_and_time_for_page page |
| 63 | I18n.l(page.published_at, :format => :ccc) rescue I18n.l(page.created_at, :format => :ccc) | 63 | I18n.l(page.published_at, :format => :ccc) rescue I18n.l(page.created_at, :format => :ccc) |
| 64 | end | 64 | end |
| 65 | 65 | ||
| 66 | def date_for_page page | ||
| 67 | I18n.l(page.published_at, :format => :ccc_date) rescue I18n.l(page.created_at, :format => :ccc_date) | ||
| 68 | end | ||
| 69 | |||
| 66 | def author_for_page page | 70 | def author_for_page page |
| 67 | page.user ? page.user.login : "Unknown author" | 71 | page.user ? page.user.login : "Unknown author" |
| 68 | end | 72 | end |
