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

Add /bbl route #438

Merged
merged 1 commit into from
Dec 5, 2017
Merged

Add /bbl route #438

merged 1 commit into from
Dec 5, 2017

Conversation

pichot
Copy link
Contributor

@pichot pichot commented Dec 5, 2017

Simple commit that adds a /bbl route. Uses already implemented bbl-demux to parse bbl and redirect to /lot route.

Unit and acceptance tests included.

@ghost ghost assigned pichot Dec 5, 2017
@ghost ghost added the in progress label Dec 5, 2017
import bblDemux from '../utils/bbl-demux';

export default Ember.Route.extend({
model(params) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@allthesignals is this the right hook to use? I tried beforeModel but it appeared that the params weren't fully loaded.

Copy link
Collaborator

@allthesignals allthesignals Dec 5, 2017

Choose a reason for hiding this comment

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

@pichot yes - beforeModel doesn't have the params object in the signature directly, you'd have to access it differently.

@pichot
Copy link
Contributor Author

pichot commented Dec 5, 2017

Rebased and ready to merge please :)

@chriswhong chriswhong merged commit 94e918a into develop Dec 5, 2017
@ghost ghost removed the in progress label Dec 5, 2017
@chriswhong chriswhong deleted the jp-bbl-route branch December 5, 2017 16:18

export default Ember.Route.extend({
model(params) {
const bbl = bblDemux(params.bbl);
Copy link
Collaborator

Choose a reason for hiding this comment

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

You might also have said:

export default Ember.Route.extend({
  model({ bbl }) {
    const { boro, block, lot } = bblDemux(bbl);
    this.transitionTo('lot', boro, block, lot);
  }
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oooh, better. Should have waited for your code review

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

3 participants