Skip to content

Instantly share code, notes, and snippets.

@myobie
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myobie/9771994 to your computer and use it in GitHub Desktop.
Save myobie/9771994 to your computer and use it in GitHub Desktop.
# example that works
get "/", {}, "rack.session" => { user_id: 1 }
# example that I wish worked
logged_in_as(1) { get "/" }
# or this
get_as_logged_in "/"
__END__
Somehow the logged_in_as would supply a third argument to the get. I've had
the idea to try to define my own get and super, but it's all just strangely
complicated.
I am also sick and out of my mind, so this could just be a bad idea.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment