Optional session saving

What’s the best way to implement a “remember me” button for login?
Should I set a cookie based on whether or not it was checked or should
I change the session expiration based on the choice?

If session, how do I change expiration from controller and not
environment.rb?