I have a simple input text field:
<input type="text" id="master_password" size="20" placeholder="Master Password" />
<a class="btn btn-default" id="master_submit" href="#">Submit</a>
And some javascript listening:
$(document).ready(function() {
$('#master_submit').click(function() {
alert("sometext");
});
});
The alert works, obviously. I want to store the text field (#master_password) in session[:master_pass] as I will be using it to decrypt many passwords stored in the database. I'm pretty sure I have to use some AJAX, but not familiar with it at all. What code would I replace the alert with in the js file (or view, or controller, of course) to store the data as a Ruby variable?