Save 36% for Black Friday! Learn more

Andrew Haines

Joined

520 Experience
5 Lessons Completed
0 Questions Solved

Activity

This is a great talk from RailsConf last year on the subject. And here's the PWA demo app he uses as an example.

I've built a couple of modest PWAs with Rails using these concepts.

You could do that initially. Although if you want to prevent users from hijacking the URL, you'll also need to protect your controllers by ensuring that the URL account_id always matches the current_user account ID. For example:

redirect_to root_path(script_name: "") unless current_user.account == Current.account
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.