Browse Source

CLDC-2895 Add rake task to squish the names of all locations, schemes, users, and organisations

pull/2004/head
David May-Miller 3 years ago
parent
commit
e4bf6f2886
  1. 19
      lib/tasks/squish_names.rake

19
lib/tasks/squish_names.rake

@ -0,0 +1,19 @@
desc "Squish names of locations, schemes, users, and organisations"
task squish_names: :environment do
Location.find_each do |location|
location.name.squish!
location.save!
end
Scheme.find_each do |scheme|
scheme.service_name.squish!
scheme.save!
end
User.find_each do |user|
user.name.squish!
user.save!
end
Organisation.find_each do |organisation|
organisation.name.squish!
organisation.save!
end
end
Loading…
Cancel
Save