gitlab-org--gitlab-foss/app/models/user_agent_detail.rb
2018-07-26 16:55:41 -07:00

11 lines
289 B
Ruby

# frozen_string_literal: true
class UserAgentDetail < ActiveRecord::Base
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