Skip to content

Commit

Permalink
Fix lint again
Browse files Browse the repository at this point in the history
  • Loading branch information
wilco375 committed Oct 11, 2024
1 parent 4e59939 commit e5f78fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/form/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ 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: -> { !user.nil? && !user.id.nil? && user.id.zero? } }
validates :user, uniqueness: { scope: :form, unless: lambda {
!user.nil? && !user.id.nil? && user.id.zero?

Check failure on line 12 in app/models/form/response.rb

View workflow job for this annotation

GitHub Actions / Lint

Layout/LineLength: Line is too long. [103/100] (https://rubystyle.guide#max-line-length)
} }
validate :form_allows_responses?

after_create :update_completed_status!
Expand Down

0 comments on commit e5f78fc

Please sign in to comment.