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

[Fixes #3604] Fix nested views #3617

Merged
merged 5 commits into from
Feb 29, 2016
Merged

[Fixes #3604] Fix nested views #3617

merged 5 commits into from
Feb 29, 2016

Conversation

sgress454
Copy link
Member

Now that req.view determines what to render based on what's in req.options, I don't see the utility of having a middleware function bound for each individual view, hence the removal of most of the code in lib/hooks/views/action.js. If I'm missing something, lemme know. Tests all pass without it though.

Also added new tests for using the view target syntax (e.g. '/foo': {view: 'foo/bar/baz'}) and a test for the ability to do '/foo': {view: 'foo'} and have it render views/foo/index.js if it exists--not sure if that was ever documented, but the code was is in there so I made sure it still works.

@mikermcneil
Copy link
Member

@sgress454 looks great 🎆

Re index.ejs routing: glad to have it tested. Probably makes sense to make a note in the relevant route target documentation about this behavior as well- I'll dig that up real quick

mikermcneil added a commit to balderdashy/sails-docs that referenced this pull request Feb 29, 2016
mikermcneil added a commit to balderdashy/sails-docs that referenced this pull request Feb 29, 2016
@mikermcneil
Copy link
Member

@sgress454 here's the change to sails-docs.

@sgress454
Copy link
Member Author

🥚zellent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants