Skip to content

Commit

Permalink
bugfix to application_question.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sussman committed Jul 30, 2024
1 parent fb219e0 commit b9ea35d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/application_question.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ def initialize(questions_params)
# == Scopes ===============================================================
# == Validations ==========================================================

# nb: attribute can be nil, so safe navigation operator is necessary with #include?

def boolean? = type.eql?("boolean")
def checkbox? = type.eql?("checkbox")
def cover_letter? = attribute.include?("cover_letter")
def cover_letter? = attribute&.include?("cover_letter")
def input? = type.eql?("input") || type.eql?("education_input")
def linkedin_related? = attribute.include?('linkedin')
def linkedin_related? = attribute&.include?('linkedin')
def multi_select? = type.eql?("multi_select")
def radiogroup? = type.eql?("radiogroup")
def resume? = attribute.eql?("resume")
Expand Down

0 comments on commit b9ea35d

Please sign in to comment.