@jjlangholtz and @andrewhooge: great job from both of you! All feedback is meant to be helpful and make this project even more awesome.
Too much logic in your controllers
GamesController could and should be made a lot simpler by moving lots of logic into your model. A good rule of thumb is move everything into the model that can be moved into the model. Here's some examples:
@jjlangholtz and @andrewhooge: great job from both of you! All feedback is meant to be helpful and make this project even more awesome.
Too much logic in your controllers
GamesController
could and should be made a lot simpler by moving lots of logic into your model. A good rule of thumb is move everything into the model that can be moved into the model. Here's some examples:https://github.com/jjlangholtz/wumpit/blob/f232f1aa88f217fafac81692e92e2cfa3aa277d1/app/controllers/games_controller.rb#L7
Lines 7-17 here should be in the Game model as a class method called something like
starting_room
.Lines 26-33 should be in the Game model as a method called something like
load_from_session(session)
, where you pass in the session to load it.Otherwise, this looks totally solid!
Feel free to close this issue after you both read it, or open new issues if you want to fix anything based off it.