jendiamond / railsgirls-signup

https://railsgirls-signup.herokuapp.com
3 stars 3 forks source link

If a User is signed in they should go directly to their tutorial page #93

Closed jendiamond closed 6 years ago

jendiamond commented 6 years ago

http://codepany.com/blog/rails-5-user-accounts-with-3-types-of-roles-devise-rails_admin-cancancan/

https://launchschool.com/blog/how-to-use-devise-in-rails-for-authentication
Devise Utility Methods

Devise contains dozens of classes, including, models, controllers, mailers, helpers, hooks, routes, and views, but since Devise exposes it’s functionality in a small number of simple helper methods, It’s unlikely that you will even need to know of the existence of all of them. The most important helper methods Devise gives you to use in your own app are:

authenticate_user!
current_user
user_signed_in?
sign_in(@user)
sign_out(@user)
user_session

authenticate_user!

https://www.learnhowtoprogram.com/rails/rails-authentication/basic-authorization-with-devise https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-Role http://railsapps.github.io/rails-authorization.html

https://github.com/jendiamond/railsgirls-signup/issues/28