Skip to content

Commit

Permalink
rubcop AI code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
starswan committed Dec 4, 2024
1 parent 7055934 commit b2ce1b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/models/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ class Subscription < ApplicationRecord
validates :email, email_address: true, if: -> { email_changed? } # Allows data created prior to validation to still be valid

FILTERS = {
teaching_job_roles: ->(vacancy, value) { (vacancy.job_roles & value).any? },
support_job_roles: ->(vacancy, value) { (vacancy.job_roles & value).any? },
teaching_job_roles: ->(vacancy, value) { vacancy.job_roles.intersect?(value) },
support_job_roles: ->(vacancy, value) { vacancy.job_roles.intersect?(value) },
visa_sponsorship_availability: ->(vacancy, value) { value.include? vacancy.visa_sponsorship_available.to_s },
ect_statuses: ->(vacancy, value) { value.include?(vacancy.ect_status) },
subjects: ->(vacancy, value) { (vacancy.subjects & value).any? },
phases: ->(vacancy, value) { (vacancy.phases & value).any? },
working_patterns: ->(vacancy, value) { (vacancy.working_patterns & value).any? },
subjects: ->(vacancy, value) { vacancy.subjects.intersect?(value) },
phases: ->(vacancy, value) { vacancy.phases.intersect?(value) },
working_patterns: ->(vacancy, value) { vacancy.working_patterns.intersect?(value) },
organisation_slug: ->(vacancy, value) { vacancy.organisations.map(&:slug).include?(value) },
keyword: ->(vacancy, value) { vacancy.searchable_content.include? value.downcase.strip },
}.freeze
Expand Down

0 comments on commit b2ce1b7

Please sign in to comment.