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

House page #15246

Merged
merged 10 commits into from
Sep 1, 2016
Merged

House page #15246

merged 10 commits into from
Sep 1, 2016

Conversation

octopusinvitro
Copy link
Contributor

@octopusinvitro octopusinvitro commented Aug 30, 2016

This PR adds a new page class for a legislature.

  • Adds a Page::House class and tests
  • Adds the route to app.rb (/:country/:house/)
  • Adds a new template and tests. The template was taken from the country template which was updated to show information from the house and to remove the loop on legislatures.

house

@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 30, 2016 16:05 Pending
@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 30, 2016 16:06 Pending
def initialize(country:, house:)
@country = country
@house = house
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't need to instantiate with both of these. Passing just the house would be cleaner, and the country can trivially be derived from that.

@tmtmtmtm
Copy link
Contributor

There's a lot of duplication now between this template and the country one. Unlike #15245, where the plan is to delete the per-country download page anyway, resolving the issue, I'm much less convinced it's OK here. We'll have two pages that are almost identical and it's going to be very easy to forget to change one when the other changes.

@tmtmtmtm tmtmtmtm assigned octopusinvitro and unassigned tmtmtmtm Aug 30, 2016
@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 30, 2016 17:15 Pending
@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 30, 2016 17:16 Pending
@octopusinvitro
Copy link
Contributor Author

After rewording the House template, it looks like this:

house

@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 30, 2016 17:37 Pending
@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 30, 2016 17:37 Pending
@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 30, 2016 17:41 Pending
@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 30, 2016 17:41 Pending
@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 31, 2016 11:56 Pending
@tmtmtmtm tmtmtmtm requested a deployment to everypolitician-viewe-pr-15246 August 31, 2016 11:57 Pending
@tmtmtmtm
Copy link
Contributor

👍 — except we can't merge before #15245, as the pages here have a link to the (not yet existing) download page for the legislature.

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.

2 participants