The page Protecting Your Cookies: HttpOnly explains why making HttpOnly cookies is a good idea.
How do I set this property in Ruby on Rails?
Just set :http_only to true as described in the changelog.