Open ghost opened 9 years ago
Overall, this is pretty solid looking code. Here are a handful of thoughts:
Models
responses
could be a bit confusing. In this context, a responses methods would generally be expected to return a collection of response objects, not namesControllers
A few more thoughts
General
ErrorsController
render :show
is more idiomatic than single quotesEmergency
full_responses
merits a scope for a single useResponder
to_params
supposed to be to_param
?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.
Verified score of 114 points
on the automated scoring, based on the current master branch.
Your individual score breakdown:
254 points total:
Placeholder issue for judge's feedback.