module RocketCMS::Models::News

Public Instance Methods

format_date() click to toggle source
# File lib/rocket_cms/models/news.rb, line 52
def format_date
  time.strftime(I18n.t('rs.format_time'))
end
html5_date() click to toggle source
# File lib/rocket_cms/models/news.rb, line 49
def html5_date
  time.strftime('%Y-%m-%d')
end
report_slug() click to toggle source
# File lib/rocket_cms/models/news.rb, line 40
def report_slug
  if time.blank?
    name
  elsif name.blank?
    time.strftime('%Y-%m-%d')
  else
    time.strftime('%Y-%m-%d') + '-' + name[0..20]
  end
end