In my app, I\'ve got a little box that appears on every page, checking on the status of requests made by the user. If a request is accepted at any time, then the user should
redirect_to is a method of ActionController::Base Class so you can not use it in ActionView.
You can try following
<% if w.accepted == true %>
<% end %>
Edited for the email parameter
window.location.href="/logins/sign_up?email=<%= w.email %>"
Sorry i don't know if there is anything in ruby for that.