Skip to content

Custom routes registered first, so collection are not overriden by the show default route#9

Open
standuprey wants to merge 2 commits into
tjpeden:masterfrom
standuprey:master
Open

Custom routes registered first, so collection are not overriden by the show default route#9
standuprey wants to merge 2 commits into
tjpeden:masterfrom
standuprey:master

Conversation

@standuprey
Copy link
Copy Markdown

  comments = this.resource('comments', function() {
    this.collection.get('search');
    this.member.get('reply');
  });

the 'search' action was registered after the default mapping, so comments/search was redirected to the comment's show action with search as id, and never reached the 'search' custom action.

This pull request makes sure that the custom actions are registered first and thus not caught be the default mapping

It also corrects a bug that made the "before" option not working on custom actions

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.

1 participant