kirkokada / railschallenge-city-watch

Our first challenge! Build a JSON API for managing your city's emergency services.
1 stars 102 forks source link

Judge's feedback #1

Open ghost opened 9 years ago

ghost commented 9 years ago

Placeholder issue for judge's feedback.

railschallenge-judge01 commented 9 years ago

Overall, this is pretty solid looking code. Here are a handful of thoughts:

Models

Controllers

railschallenge-judge02 commented 9 years ago

A few more thoughts

General

ErrorsController

Emergency

Responder

kirkokada commented 9 years ago

Thanks for the feedback!

I have just finished implementing all of the suggestions and added comment headers to the models.

One question:

Regarding the full_responses scope in emergency.rb, I moved the call to where(full_response: true) into the emergencies controller. I was under the impression that database queries should be consolidated into the model as much as possible, which was why I made the scope. For simple cases like this one that are not repeated elsewhere, is it kosher to call database queries from the controller?

Also, if someone could point me to a style guide for method comments I'd be much obliged.

ghost commented 9 years ago

Verified score of 114 points on the automated scoring, based on the current master branch.

ghost commented 9 years ago

Your individual score breakdown:

254 points total: