Navigation Menu

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

Show correct error message when no constituency petitions found #248

Merged
merged 1 commit into from Jul 2, 2015

Conversation

h-lame
Copy link
Contributor

@h-lame h-lame commented Jul 1, 2015

Because we were using @petitions.present? as our guard and both [].present? and .present? on an AR relation with no results return false we ended up telling the user that we knew their MP but didn't know their constituency. We switch to using @constituency.present? as the guard and this restores the correct behaviour.

Because we were using ``@petitions.present?`` as our guard and both ``[].present?`` and ``.present?`` on an AR relation with no results return ``false`` we ended up telling the user that we knew their MP but didn't know their constituency.  We switch to using ``@constituency.present?`` as the guard and this restores the correct behaviour.
@pixeltrix
Copy link
Contributor

LGTM

pixeltrix added a commit that referenced this pull request Jul 2, 2015
…o-petitions-found

Show correct error message when no constituency petitions found
@pixeltrix pixeltrix merged commit bb728ae into master Jul 2, 2015
@pixeltrix pixeltrix deleted the fix-local-petitions-view-when-no-petitions-found branch July 2, 2015 04:00
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