Sha256: d09cf4ddca94033378bf86862e85ba82416a9705f5303da502f617ad19f6cc79

Contents?: true

Size: 428 Bytes

Versions: 1

Compression:

Stored size: 428 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appt-0.0.1.beta.2 app/helpers/appt/application_helper.rb