Skip to content

Build Links with strings, track route setup on resource and relationships#1262

Merged
lgebhardt merged 1 commit intorelease-0-9from
linkbuilder_track_routes_0_9
Jun 26, 2019
Merged

Build Links with strings, track route setup on resource and relationships#1262
lgebhardt merged 1 commit intorelease-0-9from
linkbuilder_track_routes_0_9

Conversation

@lgebhardt
Copy link
Copy Markdown
Contributor

@lgebhardt lgebhardt commented Jun 20, 2019

Revert building links with 'url_helpers' for performance reasons

Now tracking whether routes have been setup for resources and relationships in the respective objects. This allows for the efficiency of string based link generation as well as warning when a route has not been setup. This should restore the performance we lost with the url_helpers.

Also reworked way the LinkBuilder handles Engines.

Closes #1259

All Submissions:

  • I've checked to ensure there aren't other open Pull Requests for the same update/change.
  • I've submitted a ticket for my issue if one did not already exist.
  • My submission passes all tests. (Please run the full test suite locally to cut down on noise from travis failures.)
  • I've used Github auto-closing keywords in the commit message or the description.
  • I've added/updated tests for this change.

New Feature Submissions:

  • I've submitted an issue that describes this feature, and received the go ahead from the maintainers.
  • My submission includes new tests.
  • My submission maintains compliance with JSON:API.

Bug fixes and Changes to Core Features:

  • I've included an explanation of what the changes do and why I'd like you to include them.
  • I've provided test(s) that fails without the change.

Test Plan:

Reviewer Checklist:

  • Maintains compliance with JSON:API
  • Adequate test coverage exists to prevent regressions


self.raise_if_parameters_not_allowed = true

self.warn_on_missing_routes = true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we keep this option? It was useful to turn off if one knows what they are doing, so there are no annoying warnings

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That makes sense

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've restored the setting.

…hips

Revert building links with 'url_helpers' for performance reasons
@lgebhardt lgebhardt force-pushed the linkbuilder_track_routes_0_9 branch from 6177d30 to c31a32b Compare June 21, 2019 16:40
@lgebhardt lgebhardt merged commit 0a344a0 into release-0-9 Jun 26, 2019
@lgebhardt lgebhardt deleted the linkbuilder_track_routes_0_9 branch July 9, 2019 20:49
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