crimethinc / website

Ruby on Rails app that powers crimethinc.com
https://crimethinc.com
Creative Commons Zero v1.0 Universal
101 stars 31 forks source link

Touch article when any of its translations are saved #1313

Closed veganstraightedge closed 4 years ago

veganstraightedge commented 4 years ago
  1. An article is created in English https://crimethinc.com/2019/10/09/call-to-action-solidarity-with-rojava-against-the-turkish-invasion-an-urgent-call-from-a-network-of-organizations

  2. Then a Spansih translation is created https://crimethinc.com/2019/10/09/llamado-a-la-accion-solidaridad-con-rojava-contra-la-invasion-turca

  3. A link to the English article is added to the header of the Spanish article

    Screen Shot 2019-10-12 at 6 19 08 PM
  4. A link to the Spanish article SHOULD be added to the header of the English article, but it is not. Because the the bulk of the articles#show view is cached. https://github.com/crimethinc/website/blob/master/app/views/articles/show.html.erb#L9

  5. To work around this, users can open the English article then re-save it. Which will bust the cache and make the translation links show up.


Expected

Anytime any translation of an article is created, all of the translations' (English and its translations) links should show up.

Possible approach

Maybe the best way would be to touch the other articles?

veganstraightedge commented 4 years ago

https://github.com/crimethinc/website/pull/1339