Last active
May 20, 2021 13:55
-
-
Save marcometz/a0219aec88e3e0a9fe0a1068d0846ad5 to your computer and use it in GitHub Desktop.
Revisions
-
marcometz revised this gist
May 20, 2021 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ parent_article = Goldencobra::Article.create!(url_name: "cities", breadcrumb: "cities", title: "cities", article_type: "City Index") inactive_cities = City.where(article_id: nil) inactive_cities.each do |city| city_article = Goldencobra::Article.new(teaser: city.title, content: "", breadcrumb: city.title, title: city.title, article_type: "City Show", parent_id: parent_article.id) city_article.city = city city_article.save end -
marcometz revised this gist
May 18, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ parent_article = Goldencobra::Article.create!(url_name: "cities", breadcrumb: "cities", title: "cities", article_type: "City Index") inactive_city_ids = City.where(article_id: nil) inactive_city_ids.each do |city| city_article = Goldencobra::Article.new(teaser: "", content: "", breadcrumb: city.title, title: city.title, article_type: "City Show", parent_id: parent_article.id) -
marcometz revised this gist
May 18, 2021 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ parent_article = Goldencobra::Article.create!(url_name: "cities", breadcrumb: "cities", title: "cities", article_type: "City Index") inactive_city_ids = City.where(article_id: nil).pluck(:id) inactive_city_ids.each do |city| city_article = Goldencobra::Article.new(teaser: "", content: "", breadcrumb: city.title, title: city.title, article_type: "City Show", parent_id: parent_article.id) city_article.city = city city_article.save end -
marcometz created this gist
Mar 29, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ parent_article = Goldencobra::Article.create!(url_name: "cities", breadcrumb: "cities", title: "cities", article_type: "City Index") City.all.each do |city| city_article = Goldencobra::Article.new(teaser: "", content: "", breadcrumb: city.title, title: city.title, article_type: "City Show", parent_id: parent_article.id) city_article.city = city city_article.save end