RailsCasts Pro episodes are now free!

Learn more or hide this

Hayk Saakian's Profile

GitHub User: hayksaakian

Site: hayksaakian.com

Comments by Hayk Saakian

Avatar

Do SSEs work on heroku. I ask because was looking into websockets on rails and heroku, but they don't support them.

Avatar

If you're using this now, note that the example in the github repo is incorrect
https://github.com/rails/pjax_rails

should be:

$('[data-pjax-container]').pjax('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])');

not:

$('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]');

see issue:
https://github.com/rails/pjax_rails/issues/51

Avatar

Is there a way to use this for pages that contain mostly static content, that is only updated whenever the app is updated?

I have some static pages (tutorial, help, contact, about, etc.) that use embedded ruby for for some things, but should otherwise be cached.

Avatar

I learned more in those 9 minutes than in any other 9 minutes i can recall.

Avatar

This seems highly insecure, what if I simply in spec your page in my browser and alter the html?

I suppose you would be validating credentials in controllers as well though...

On the other hand what if it's secure data? Are there not valid cases where the HTML should never be delivered for a subset of users?