Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix style/optionalBooleanParam cop #6211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading