Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

renderPjax() vs render() #1

Open
orbiteleven opened this issue Feb 27, 2014 · 3 comments
Open

renderPjax() vs render() #1

orbiteleven opened this issue Feb 27, 2014 · 3 comments

Comments

@orbiteleven
Copy link

Since this is middleware, why not just override res.render? I could see how this might be problematic, but it would make it so the rest of the site could handle pjax more seamlessly.

Perhaps I'll play with this on a fork, but I'm curious to folks' take.

@optikfluffel
Copy link
Owner

That's a good point, the only problem I see here is, that you have no more possibility to render something without pjax. Adding a method like renderLegacy sounds a little strange doesn't it?

@orbiteleven
Copy link
Author

Yeah it does sound strange. Doesn't this pjax middleware just fall back to the original method when the pjax header doesn't exist? I suppose a case where the pjax header exits but you don't want to render a partial...

I'll play with this some and PR it.

@optikfluffel
Copy link
Owner

👍

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

No branches or pull requests

2 participants