Parei em:
http://ruby.railstutorial.org/chapters/sign-in-sign-out#code-bootstrap_js