0
0
Fork 0

Fixes and general progress

This commit is contained in:
Eugen Rochko 2016-02-22 18:10:30 +01:00
parent 709c6685a9
commit 1dad72bf13
15 changed files with 133 additions and 34 deletions

View file

@ -1,6 +1,24 @@
class Status < ActiveRecord::Base
belongs_to :account, inverse_of: :statuses
validates :account, presence: true
def verb
:post
end
def object_type
:note
end
def content
self.text
end
def title
content.truncate(80, omission: "...")
end
after_create do
self.account.stream_entries.create!(activity: self)
end