Class: Bloggable::Article

Inherits:
ApplicationRecord show all
Extended by:
FriendlyId
Includes:
AASM
Defined in:
app/models/bloggable/article.rb

Instance Method Summary collapse

Instance Method Details

#set_transition_timestamp(given_status, time = Time.now) ⇒ Object



32
33
34
35
# File 'app/models/bloggable/article.rb', line 32

def set_transition_timestamp(given_status, time=Time.now)
  timestamp_field = "#{given_status}_at".to_sym
  self[timestamp_field] = time
end