Class: Elabs::Article

Inherits:
ApplicationContentRecord show all
Defined in:
app/models/elabs/article.rb

Constant Summary collapse

SLUGGABLE_FIELD =
:title
ADDITIONAL_HABTM_COUNTER_CACHES =
[
  %w[projects articles]
].freeze

Constants inherited from ApplicationContentRecord

Elabs::ApplicationContentRecord::SLUG_FIELD

Instance Attribute Summary

Attributes inherited from ApplicationRecord

#changed_by

Instance Method Summary collapse

Methods included from Concerns::Sluggable

#fill_slug, #to_param

Methods included from Concerns::Taggable

#save_tags_list, #tags_list

Methods included from Concerns::ActableEntity

#minor_update=, #minor_update?

Methods included from Concerns::ContentEntity

#draft?, #locked?, #not_publicly_visible?, #publicly_visible?, #published?, #unlocked?

Instance Method Details

#long_text_to_displayObject



35
36
37
# File 'app/models/elabs/article.rb', line 35

def long_text_to_display
  content
end

#short_text_to_displayObject



31
32
33
# File 'app/models/elabs/article.rb', line 31

def short_text_to_display
  excerpt
end

#title_to_displayObject



27
28
29
# File 'app/models/elabs/article.rb', line 27

def title_to_display
  title
end