Enable some Rails cops
This commit is contained in:
parent
da3d9d403a
commit
0a9f442260
83 changed files with 180 additions and 178 deletions
|
@ -19,7 +19,7 @@ namespace :'2017_07_26_clean_birthdate_on_individual' do
|
|||
puts "cleaning #{i.birthdate}"
|
||||
new_date = Date.strptime(i.birthdate, "%d/%m/%y")
|
||||
if new_date.year > 2017
|
||||
new_date = new_date - 100.year
|
||||
new_date = new_date - 100.years
|
||||
end
|
||||
i.update(birthdate: new_date.iso8601)
|
||||
end
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace :'2017_10_30_copy_commentaire_piece_justificative_to_file' do
|
|||
end
|
||||
|
||||
commentaire.save
|
||||
if !commentaire.file.present?
|
||||
if commentaire.file.blank?
|
||||
puts "Failed to save file for commentaire #{commentaire.id}"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace :cloudstorage do
|
|||
|
||||
@cont.objects_detail.each { |object, details|
|
||||
last_modified = DateTime.parse(details[:last_modified])
|
||||
@cont.delete_object(object) if last_modified.utc <= (Time.now - 2.year).utc
|
||||
@cont.delete_object(object) if last_modified.utc <= (Time.now - 2.years).utc
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue