Skip to content

Commit

Permalink
Reverted rubocop Style/OptionalBooleanParameter it is not working as …
Browse files Browse the repository at this point in the history
…expected
  • Loading branch information
Deepika Gonuguntla committed Mar 28, 2023
1 parent 2fab727 commit ae53386
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ Lint/DuplicateMagicComment:
Lint/DuplicateRegexpCharacterClassElement:
Enabled: true

Style/OptionalBooleanParameter:
Enabled: false

AllCops:
NewCops: disable
SuggestExtensions: false
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/bibs_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module BibsHelper
include MlnResponse
include MlnHelper

def validate_input_params(req_body, validate: false)
def validate_input_params(req_body, validate = false)
bnumber = req_body['id']
title = req_body['title']
physical_description = var_field(req_body, '300')
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/teacher_sets_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module TeacherSetsHelper
PREK_ARR = ['PRE K', 'PRE-K', 'PREK'].freeze


def var_field_data(marc_tag, merge: true)
def var_field_data(marc_tag, merge = true)
var_field(@req_body, marc_tag, merge)
end

def var_field(req_body, marc_tag, merge: true)
def var_field(req_body, marc_tag, merge = true)
if merge == true
req_body['varFields'].detect { |hash| hash['marcTag'] == marc_tag }['subfields'].map { |x| x['content'] }.join(', ')
else
Expand Down
2 changes: 1 addition & 1 deletion app/models/teacher_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def create_or_update_teacherset_document_in_es
end

# Delete teacher-set record from db and elastic search.
def self.delete_teacher_set(bib_id, suppressed: false)
def self.delete_teacher_set(bib_id, suppressed = false)
# Get teacher-set record by bib_id
teacher_set = self.get_teacher_set_by_bnumber(bib_id)
unless teacher_set.present?
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def self.default_password
"mylibrarynyc"
end

def name(full: false)
def name(full = false)
handle = self.email.sub /@.*/, ''
name = self.first_name
name += " #{self.last_name}" if full && !self.last_name.nil? && !self.last_name.empty?
Expand Down

0 comments on commit ae53386

Please sign in to comment.