Created
April 29, 2016 10:55
-
-
Save samrayner/286669cb68a1c8ea99b95c60fc0d02a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def titled_time_tag(time, *args, &block) | |
options = args.extract_options! | |
format = options.delete(:format) || :mon_d_12hr | |
content = args.first || time.to_s(format) | |
time_tag time, content, options.reverse_merge(title: time.to_s(:long)), &block | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment