user_ip.rb 305 B

12345678910111213141516171819
  1. # frozen_string_literal: true
  2. # == Schema Information
  3. #
  4. # Table name: user_ips
  5. #
  6. # user_id :bigint(8) primary key
  7. # ip :inet
  8. # used_at :datetime
  9. #
  10. class UserIp < ApplicationRecord
  11. self.primary_key = :user_id
  12. belongs_to :user, foreign_key: :user_id
  13. def readonly?
  14. true
  15. end
  16. end