public
Description: Starter Kit for developers using Ruby on Rails to quickly get a blog up & running and then add features.
Homepage: http://www.faithfulgeek.org
Clone URL: git://github.com/faithfulgeek/blog-starter-kit.git
blog-starter-kit / app / helpers / application_helper.rb
100644 10 lines (9 sloc) 0.286 kb
1
2
3
4
5
6
7
8
9
10
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def format_date_long(date)
    date.strftime("%A, %B #{date.day.ordinalize}, %Y at %I:%M%p")
  end
  
  def format_date_short(date)
    date.to_s(:short_date_only)
  end
end