debian-mirror-gitlab/app/models/user_agent_detail.rb

12 lines
289 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2016-09-13 17:45:13 +05:30
class UserAgentDetail < ActiveRecord::Base
2017-09-10 17:25:29 +05:30
belongs_to :subject, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
2016-09-13 17:45:13 +05:30
validates :user_agent, :ip_address, :subject_id, :subject_type, presence: true
def submittable?
!submitted?
end
end