The code powering m.abunchtell.com https://m.abunchtell.com
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

28 рядки
595 B

  1. # frozen_string_literal: true
  2. # == Schema Information
  3. #
  4. # Table name: mentions
  5. #
  6. # id :integer not null, primary key
  7. # account_id :integer
  8. # status_id :integer
  9. # created_at :datetime not null
  10. # updated_at :datetime not null
  11. #
  12. class Mention < ApplicationRecord
  13. belongs_to :account, inverse_of: :mentions, required: true
  14. belongs_to :status, required: true
  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