Module: RocketCMS::Models::News

Extended by:
ActiveSupport::Concern
Includes:
Enableable, ManualSlug, Mongoid::Paperclip, ElasticSearch, RocketCMS::Model, Seoable
Included in:
News
Defined in:
lib/rocket_cms/models/news.rb

Instance Method Summary collapse

Methods included from ManualSlug

#text_slug, #text_slug=

Methods included from Seoable

admin, #get_og_title, #page_title, seo_config

Instance Method Details

#format_dateObject



56
57
58
# File 'lib/rocket_cms/models/news.rb', line 56

def format_date
  time.strftime('%d.%m.%Y')
end

#html5_dateObject



52
53
54
# File 'lib/rocket_cms/models/news.rb', line 52

def html5_date
  time.strftime('%Y-%m-%d')
end

#report_slugObject



48
49
50
# File 'lib/rocket_cms/models/news.rb', line 48

def report_slug
  time.strftime('%Y-%m-%d') + '-' + name[0..20]
end