Javascript Alert For Unsaved Changes with Turbolinks, Jquery, And Rails 4
- Categories:
- ruby
- rails
- javascript
Update 2020-04-04: This script based on old version Coffescript, jQuery, and Turbolinks circa 2013.
jQuery change event can be used to detect form change. But because Turbolinks pages will change without full reload, we can’t rely on DOMContentLoaded
or jQuery.ready()
to trigger change event. Here is how to write jQuery change event code with Turbolinks enabled. Tested with Rails 4.0.0. Github Gist.
Recent Posts
How to Defend Against Brute-Force and DoS Attacks with Fail2ban, Nginx limit_req, and iptables
In this tutorial, I’ll explain how to protect your public-facing Linux server and Nginx web server from common threats, including brute-force and DoS attacks.
Is Getting AWS Solutions Architect Associate Certification Worth It?
If you are a full-time Software Engineer, there's no strong need to pursue this certification.
DevSecOps
My Notes about DevSecOps
AWS Secrets Manager
Explanation about AWS Secrets Manager with example code.
Envelope Encryption
Envelope encryption is the practice of encrypting plaintext data with a data key, and then encrypting the data key under another key.