diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-08-09 20:43:47 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-08-16 01:20:57 +0300 |
commit | 5994c11910822463faeabb7b5f11d6529036db9d (patch) | |
tree | a80a8ffea4d4ef868790aab627abfcaa1c982d10 /app/models/user_agent_detail.rb | |
parent | 43e756d4eafd79f4d2f366b646ebb94af78b5a4c (diff) |
Further refactor and syntax fixes.
Diffstat (limited to 'app/models/user_agent_detail.rb')
-rw-r--r-- | app/models/user_agent_detail.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/app/models/user_agent_detail.rb b/app/models/user_agent_detail.rb index 6d76dff20e3..0949c6ef083 100644 --- a/app/models/user_agent_detail.rb +++ b/app/models/user_agent_detail.rb @@ -1,16 +1,9 @@ class UserAgentDetail < ActiveRecord::Base belongs_to :subject, polymorphic: true - validates :user_agent, - presence: true - validates :ip_address, - presence: true - validates :subject_id, - presence: true - validates :subject_type, - presence: true + validates :user_agent, :ip_address, :subject_id, :subject_type, presence: true def submittable? - user_agent.present? && ip_address.present? + !submitted? end end |