I'm trying to do something very simple, but I can't figure out. How can I access a local JavaScript variable in Ruby? Or, if that's not possible, can I find an element on the page by its name or id? I'm trying to fit it into the following:
inp = document.getElementById("email").value;
<% if User.pluck(:email).include? **JAVASCRIPT VARIABLE "INP"** then %>
alert("found")
<% end %>
Thanks.