app/helpers/appt/application_helper.rb in appt-0.0.1.beta.1 vs app/helpers/appt/application_helper.rb in appt-0.0.1.beta.2

- old
+ new

@@ -1,4 +1,20 @@ module Appt module ApplicationHelper + def title(title = nil) + if title + content_for(:title) { title } + else + content_for?(:title) ? content_for(:title) : nil + end + end + + def time_ago_tag(value) + if value.nil? + nil + else + #TODO: i18n? + time_tag(value, "#{time_ago_in_words(value)} ago", title: value.strftime('%m/%d/%Y %I:%M%p')) + end + end end end