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

Updates to tool renting page #1057

Closed
wants to merge 1 commit into from
Closed

Updates to tool renting page #1057

wants to merge 1 commit into from

Conversation

ldrenth
Copy link
Contributor

@ldrenth ldrenth commented Dec 8, 2020

Closes #1035

def perform(rent_id)
rent = ToolRenting.find(rent_id)

unless rent.nil? || rent.returned

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||.


scheduled.map do |job|
if job.klass == 'ToolRentingReminderWorker'
if job.args.include? rent.id

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.

scheduled = Sidekiq::ScheduledSet.new.select

scheduled.map do |job|
if job.klass == 'ToolRentingReminderWorker'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Next: Use next to skip iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updates to tool-lending system
2 participants