Merge pull request #1490 from tchak/fix-private-champs-task
some old champ live in a parallel space time continuum without valid …
This commit is contained in:
commit
990b8c09ce
1 changed files with 3 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
||||||
namespace :'2018_02_13_fill_champ_private_and_type' do
|
namespace :'2018_02_13_fill_champ_private_and_type' do
|
||||||
task set: :environment do
|
task set: :environment do
|
||||||
Champ.includes(:type_de_champ).find_each do |champ|
|
Champ.includes(:type_de_champ).find_each do |champ|
|
||||||
|
if champ.type_de_champ.present?
|
||||||
champ.update_columns(champ.type_de_champ.params_for_champ)
|
champ.update_columns(champ.type_de_champ.params_for_champ)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
TypeDeChamp.find_each do |type_de_champ|
|
TypeDeChamp.find_each do |type_de_champ|
|
||||||
type_de_champ.update_columns(
|
type_de_champ.update_columns(
|
||||||
|
|
Loading…
Reference in a new issue