Skip to content

Instantly share code, notes, and snippets.

View alterisian's full-sized avatar

Ian Moss alterisian

View GitHub Profile
model.methods.sort.each{|m| puts m}; nil
# Convience method for ordanalized_date_string
def ods( date, day_of_week=false )
return ordanalized_date_string( date, day_of_week )
end
# Returns date string in format '29th December, 2009' i.e. UK style
# use instead of date.to_s( %stuff %rndstuff %another )
def ordanalized_date_string( date, day_of_week=false )
date_str = "#{date.day.ordinalize} %B, %Y"
this isn't a test