The code powering m.abunchtell.com https://m.abunchtell.com
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

28 linhas
567 B

  1. # frozen_string_literal: true
  2. # == Schema Information
  3. #
  4. # Table name: mentions
  5. #
  6. # id :bigint(8) not null, primary key
  7. # status_id :bigint(8)
  8. # created_at :datetime not null
  9. # updated_at :datetime not null
  10. # account_id :bigint(8)
  11. #
  12. class Mention < ApplicationRecord
  13. belongs_to :account, inverse_of: :mentions
  14. belongs_to :status
  15. has_one :notification, as: :activity, dependent: :destroy
  16. validates :account, uniqueness: { scope: :status }
  17. delegate(
  18. :username,
  19. :acct,
  20. to: :account,
  21. prefix: true
  22. )
  23. end