Skip to content
Browse files

Date helper and course released date on show page

  • Loading branch information...
1 parent 5789f07 commit 0ff6fd019a8149e285362e1993ab7d70f8f71278 @aslamnd committed Feb 16, 2012
Showing with 6 additions and 0 deletions.
  1. +4 −0 app/helpers/application_helper.rb
  2. +2 −0 app/views/courses/show.html.haml
View
4 app/helpers/application_helper.rb
@@ -16,4 +16,8 @@ def copywrites
"© #{year}, #{ link_to 'Aslam Najeebdeen', 'http://aslamnajeebdeen.com' }".html_safe
end
+ def display_date(date)
+ date.strftime("%d/%m/%Y")
+ end
+
end
View
2 app/views/courses/show.html.haml
@@ -5,6 +5,8 @@
= "Difficulty: #{@course.difficulty_name}"
|
= "Duration: #{@course.duration}"
+ |
+ = "Released: #{ display_date(@course.released) }"
%p= @course.description

0 comments on commit 0ff6fd0

Please sign in to comment.
Something went wrong with that request. Please try again.