debian-mirror-gitlab/app/models/user_agent_detail.rb
2019-05-18 00:54:41 +05:30

11 lines
288 B
Ruby

# frozen_string_literal: true
class UserAgentDetail < ApplicationRecord
belongs_to :subject, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
validates :user_agent, :ip_address, :subject_id, :subject_type, presence: true
def submittable?
!submitted?
end
end