Skip to content

Instantly share code, notes, and snippets.

@stan
Forked from anonymous/gist:2086498
Last active August 29, 2015 14:08
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 stan/9cc12df3ea905c4fb3f7 to your computer and use it in GitHub Desktop.
Save stan/9cc12df3ea905c4fb3f7 to your computer and use it in GitHub Desktop.
authenticated do
root :to => 'teachers/dashboards#show', :constraints => lambda{ |req| req.session['warden.user.user.key'][0] == 'Teacher' }
root :to => 'students/dashboards#show', :constraints => lambda{ |req| req.session['warden.user.user.key'][0] == 'Student' }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment