Skip to content

Commit

Permalink
Disable lint on line
Browse files Browse the repository at this point in the history
  • Loading branch information
wilco375 committed Oct 11, 2024
1 parent e5f78fc commit 12d4c7c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/form/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ class Response < ApplicationRecord
has_many :closed_question_answers, dependent: :destroy
has_many :closed_questions, through: :closed_question_answers, source: :question

validates :user, uniqueness: { scope: :form, unless: lambda {
!user.nil? && !user.id.nil? && user.id.zero?
} }
validates :user, uniqueness: { scope: :form, unless: -> { user_id == 0 } } # rubocop:disable Style/NumericPredicate
validate :form_allows_responses?

after_create :update_completed_status!
Expand Down

0 comments on commit 12d4c7c

Please sign in to comment.