CDRH / african_poetics

Orchid / Rails site for Contemporary African Poets part of African Poetics site
0 stars 0 forks source link

Prepare the african poetry rails site to pull all data from the index #236

Closed karindalziel closed 1 year ago

karindalziel commented 1 year ago

Currently, the public site pulls some data from the index and other data from a database which was populated using the now defunct rails admin site. In preparation for pulling all the data from the index, a first step is to alter the site so it can run completely from the api.

Initially, this may mean commenting out a lot of code, and pulling in one or two data pieces as a proof of concept.

as one example: in the views, those items that use @record are pulling from a database: https://github.com/CDRH/african_poetics/blob/main/app/views/inthenewsnewsitems/show.html.erb

items that are pulling @item are pulling from the API: https://github.com/CDRH/african_poetics/blob/main/app/views/inthenewsworks/show.html.erb

karindalziel commented 1 year ago

@techgique please comment if you have other ideas off the top of your head

wkdewey commented 1 year ago

Changing the database config, deleting all the record models and commenting out @featured = Commentary.featured.sample is enough to get the site running without errors (but that might not still be the case once I have items in the InTheNews section).

wkdewey commented 1 year ago

The @item variables also make use of the database, there are es_to_db methods and if I strip out the database, these also don't work regardless of what is in the API.