debian-mirror-gitlab/app/models/user_agent_detail.rb
2017-09-10 17:25:29 +05:30

9 lines
258 B
Ruby

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