tag_follow.rb 514 B

123456789101112131415161718192021222324
  1. # frozen_string_literal: true
  2. # == Schema Information
  3. #
  4. # Table name: tag_follows
  5. #
  6. # id :bigint(8) not null, primary key
  7. # tag_id :bigint(8) not null
  8. # account_id :bigint(8) not null
  9. # created_at :datetime not null
  10. # updated_at :datetime not null
  11. #
  12. class TagFollow < ApplicationRecord
  13. include RateLimitable
  14. include Paginable
  15. belongs_to :tag
  16. belongs_to :account
  17. accepts_nested_attributes_for :tag
  18. rate_limit by: :account, family: :follows
  19. end