Skip to content
Extraits de code Groupes Projets
Valider f2a27ea9 rédigé par Raphael's avatar Raphael
Parcourir les fichiers

Another try at getting the youtube titles in

parent 597a7a8a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Chargement en cours
...@@ -85,7 +85,14 @@ module DataConversion ...@@ -85,7 +85,14 @@ module DataConversion
def comments_json_to_csv model_hash def comments_json_to_csv model_hash
generic_json_to_csv(model_hash) do |hash| generic_json_to_csv(model_hash) do |hash|
model_hash[:mongo_attrs].map { |attr_name| hash[attr_name] } model_hash[:mongo_attrs].map { |attr_name|
attr_val = hash[attr_name]
if (attr_name == "youtube_titles" && attr_val && !attr_val.empty?)
attr_val.to_yaml
else
attr_val
end
}
end end
end end
...@@ -155,7 +162,14 @@ module DataConversion ...@@ -155,7 +162,14 @@ module DataConversion
def posts_json_to_csv model_hash def posts_json_to_csv model_hash
generic_json_to_csv(model_hash) do |hash| generic_json_to_csv(model_hash) do |hash|
model_hash[:mongo_attrs].map { |attr_name| hash[attr_name] } model_hash[:mongo_attrs].map { |attr_name|
attr_val = hash[attr_name]
if (attr_name == "youtube_titles" && attr_val && !attr_val.empty?)
attr_val.to_yaml
else
attr_val
end
}
end end
#has to handle the polymorphic stuff #has to handle the polymorphic stuff
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter