Skip to content
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

Merged
merged 59 commits into from
Jun 17, 2017
Merged

CurrentEntityController #1096

merged 59 commits into from
Jun 17, 2017

Conversation

irees
Copy link
Member

@irees irees commented May 20, 2017

Resolves #1064

@irees irees requested a review from drewda June 15, 2017 17:44
@irees irees changed the title [WIP] EntityController EntityController Jun 15, 2017
Copy link
Member

@drewda drewda left a 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]))
Copy link
Member

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?

Copy link
Member

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"}

@irees irees changed the title EntityController CurrentEntityController Jun 17, 2017
@irees irees merged commit 8eefdac into master Jun 17, 2017
@irees irees removed the in progress label Jun 17, 2017
@irees irees deleted the entity-controller-common branch June 19, 2017 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants