Class: CargoWiki::Article

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/cargo_wiki/article.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#last_commit_messageObject

Returns the value of attribute last_commit_message.



5
6
7
# File 'app/models/cargo_wiki/article.rb', line 5

def last_commit_message
  @last_commit_message
end

Instance Method Details

#last_update_byObject



16
17
18
19
# File 'app/models/cargo_wiki/article.rb', line 16

def last_update_by
  whodunnit = self.versions.last.whodunnit
  whodunnit.nil? ? self.author : User.find(whodunnit)
end