-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CurrentEntityController #1096
CurrentEntityController #1096
Conversation
For controller ease
# Conflicts: # app/controllers/api/v1/route_stop_patterns_controller.rb
This reverts commit 3e3cccd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code is looking good and my local testing is working, with one small exception I flagged.
|
||
# Imported From Feed | ||
if params[:imported_from_feed].present? | ||
@collection = @collection.where_imported_from_feed(Feed.find_by_onestop_id(params[:imported_from_feed])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be find_by_onestop_id!
with a bang?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might explain why when I run a local request like http://localhost:3000/api/v1/stops?imported_from_feed=f-a-no (with a non-existent feed Onestop ID), I get back:
{"message":"[NoMethodError] undefined method `id' for nil:NilClass"}
Resolves #1064