Module: Cms::Extensions::ActiveRecord::Base

Defined in:
lib/cms/extensions/active_record/base.rb

Instance Method Summary collapse

Instance Method Details

#updated_on_string(fmt = "%b %e, %Y") ⇒ Object



6
7
8
9
10
11
12
# File 'lib/cms/extensions/active_record/base.rb', line 6

def updated_on_string(fmt="%b %e, %Y")
  if respond_to?(:updated_at) && updated_at
    updated_at.strftime(fmt).gsub(/\s{2,}/," ")
  else
    nil
  end
end