Use symbol procs

This commit is contained in:
Brenda Wallace
2017-12-06 14:17:34 +13:00
parent 3fdc23098e
commit 878fc7ebcd
2 changed files with 2 additions and 13 deletions

View File

@@ -160,13 +160,6 @@ Style/RegexpLiteral:
- 'spec/views/members/index.html.haml_spec.rb'
- 'spec/views/posts/index.html.haml_spec.rb'
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to, define_method
Style/SymbolProc:
Exclude:
- 'lib/tasks/growstuff.rake'
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, WordRegex.
# SupportedStyles: percent, brackets

View File

@@ -276,16 +276,12 @@ namespace :growstuff do
desc "October 2014: remove unused photos"
task remove_unused_photos: :environment do
Photo.find_each do |p|
p.destroy_if_unused
end
Photo.find_each(&:destroy_if_unused)
end
desc "October 2014: generate crops_posts records for existing posts"
task generate_crops_posts_records: :environment do
Post.find_each do |p|
p.save
end
Post.find_each(&:save)
end
desc "October 2014: add alternate names for crops"