Skip to content

Commit

Permalink
fix style/optionalBooleanParam cop
Browse files Browse the repository at this point in the history
  • Loading branch information
manbhav234 committed Feb 25, 2025
1 parent 9ae6975 commit e2fd5a5
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ Style/DateTime:
Enabled: false
Rails/ContentTag:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Style/ExplicitBlockArgument:
Enabled: false
Style/KeywordParametersOrder:
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/surveys_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def validate_user_for_survey
return false
end

def user_is_assigned_to_survey(return_notification = false)
def user_is_assigned_to_survey(return_notification: false)
return false if current_user.nil?
notifications = current_user.survey_notifications.select do |n|
n if n.survey.id == @survey.id
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/tickets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def search

private

def send_ticket_notification(owner=false)
def send_ticket_notification(owner: false)
set_ticket_details
TicketNotificationMailer.notify_of_message(
course: @course,
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/surveys_analytics_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module SurveysAnalyticsHelper
def survey_status(survey, count = false)
def survey_status(survey, count: false)
assignments = SurveyAssignment.published.where(survey_id: survey.id)
return assignments.count if count
return "In Use (#{assignments.count})" unless assignments.empty?
Expand Down
2 changes: 1 addition & 1 deletion app/mailers/instructor_notification_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def self.send_email(alert, bcc_to_salesforce)
email(alert, bcc_to_salesforce).deliver_now
end

def email(alert, bcc_to_salesforce = true)
def email(alert, bcc_to_salesforce: true)
@alert = alert
set_email_parameters
params = { to: @instructors.pluck(:email),
Expand Down
2 changes: 1 addition & 1 deletion app/models/alert_types/instructor_notification_alert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def url
end

# deliver the actual email immediately
def send_email(bcc_to_salesforce=true)
def send_email(bcc_to_salesforce: true)
return if emails_disabled?
InstructorNotificationMailer.send_email(self, bcc_to_salesforce)
update(email_sent_at: Time.zone.now)
Expand Down
2 changes: 1 addition & 1 deletion app/models/user_data/training_modules_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def furthest_slide?(slide_slug)
training_progress_manager.slide_further_than_previous?(slide_slug, last_slide_completed)
end

def mark_completion(value=true, course_id=nil)
def mark_completion(value: true, course_id: nil)
flags[course_id] = { marked_complete: value }
end

Expand Down

0 comments on commit e2fd5a5

Please sign in to comment.