user_invite_request.rb 471 B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. # == Schema Information
  3. #
  4. # Table name: user_invite_requests
  5. #
  6. # id :bigint(8) not null, primary key
  7. # user_id :bigint(8)
  8. # text :text
  9. # created_at :datetime not null
  10. # updated_at :datetime not null
  11. #
  12. class UserInviteRequest < ApplicationRecord
  13. TEXT_SIZE_LIMIT = 420
  14. belongs_to :user, inverse_of: :invite_request
  15. validates :text, presence: true, length: { maximum: TEXT_SIZE_LIMIT }
  16. end