Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
stepchud committed Dec 18, 2024
1 parent 8cb8488 commit c947eed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/evaluation_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ def find_duplicate_titles
def add_criteria_title_errors(duplicate_titles)
criteria = evaluation_criteria.
reject(&:marked_for_destruction?).
select{|c| duplicate_titles.include?(c.title)}.
reject{|c| c.errors.added?(:title, I18n.t("evaluation_criteria.duplicate_title_error"))}
select { |c| duplicate_titles.include?(c.title) }.
reject { |c| c.errors.added?(:title, I18n.t("evaluation_criteria.duplicate_title_error")) }

criteria.each {|c| c.errors.add(:title, I18n.t("evaluation_criteria.duplicate_title_error")) }
criteria.each { |c| c.errors.add(:title, I18n.t("evaluation_criteria.duplicate_title_error")) }
errors.add(:base, I18n.t("evaluation_criterion_unique_title_in_form_error"))
end

Expand Down

0 comments on commit c947eed

Please sign in to comment.