MegaGameSociety / WatchTheSkiesDashboard

Watch the Skies Dashboard
1 stars 2 forks source link

Updating Game Reset with latest functionality and fix button #37

Closed FifthSurprise closed 8 years ago

FifthSurprise commented 8 years ago

Currently, we have a game reset button on the administration page. It works like this:

User hits the route /reset_game, this goes to the Games Controller and hits the reset method.

The reset method grabs the user's Game It calls that Game's reset method which does some stuff (delete and initialize game data) and then does some additional cleanup tasks wiping out other model data.

As we move to multiple games operating in the app, we need to update this.

You will notice that we are doing some very drastic stuff in the reset method like delete all of the tweets or all of the news messages from the database. This is on purpose because the schema changes connecting a game to all of its tweets or news messages or PR's isn't there yet. Rest assured, those connections will be handled by someone else and you don't have to worry about it. Game will be updated so it knows how to access its own PR for example and so a call to PublicRelation.delete_all will be changed with self.publicrelations.delete_all in a separate pr.

Users should be deleted except for admin/superadmin users.

FifthSurprise commented 8 years ago

This was completed. Tweet import was stubbed out which is fine. Probably should implement VCR and record a message back from Twitter. That or just better stub out Tweet.import so that it creates a tweet.