debian-mirror-gitlab/elasticsearch-rails/elasticsearch-model/spec/support/app/author.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
182 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
class Author < ActiveRecord::Base
has_many :authorships
after_update { self.authorships.each(&:touch) }
def full_name
[first_name, last_name].compact.join(' ')
end
end