mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-19 06:15:44 -04:00
Prefer if/unless modifier
This commit is contained in:
@@ -108,14 +108,6 @@ Style/IdenticalConditionalBranches:
|
||||
Exclude:
|
||||
- 'app/controllers/follows_controller.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: MaxLineLength.
|
||||
Style/IfUnlessModifier:
|
||||
Exclude:
|
||||
- 'app/helpers/crops_helper.rb'
|
||||
- 'config/initializers/geocoder.rb'
|
||||
- 'lib/tasks/growstuff.rake'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||
# SupportedStyles: line_count_dependent, lambda, literal
|
||||
|
||||
@@ -8,9 +8,7 @@ module CropsHelper
|
||||
total_quantity += seed.quantity if seed.quantity
|
||||
end
|
||||
|
||||
if seeds.none?
|
||||
return "You don't have any seeds of this crop."
|
||||
end
|
||||
return "You don't have any seeds of this crop." if seeds.none?
|
||||
|
||||
if total_quantity != 0
|
||||
"You have #{total_quantity} #{Seed.model_name.human(count: total_quantity)} of this crop."
|
||||
|
||||
@@ -11,6 +11,4 @@ Geocoder.configure(
|
||||
)
|
||||
# This configuration takes precedence over environment/test.rb
|
||||
# Reported as https://github.com/alexreisner/geocoder/issues/509
|
||||
if Geocoder.config.lookup != :test
|
||||
Geocoder.configure(lookup: :nominatim)
|
||||
end
|
||||
Geocoder.configure(lookup: :nominatim) if Geocoder.config.lookup != :test
|
||||
|
||||
@@ -140,9 +140,7 @@ namespace :growstuff do
|
||||
|
||||
puts "Giving each member an account record..."
|
||||
Member.all.each do |m|
|
||||
unless m.account
|
||||
Account.create(member_id: m.id)
|
||||
end
|
||||
Account.create(member_id: m.id) unless m.account
|
||||
end
|
||||
|
||||
puts "Making Skud a staff account..."
|
||||
|
||||
Reference in New Issue
Block a user