You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
400 B

  1. class Favourite < ApplicationRecord
  2. include Streamable
  3. belongs_to :account, inverse_of: :favourites
  4. belongs_to :status, inverse_of: :favourites
  5. def verb
  6. :favorite
  7. end
  8. def title
  9. "#{self.account.acct} favourited a status by #{self.status.account.acct}"
  10. end
  11. def object_type
  12. target.object_type
  13. end
  14. def thread
  15. self.status
  16. end
  17. def target
  18. thread
  19. end
  20. end