Open kibreab opened 6 years ago
This is done now
NOTE: run these commands to make this effective.
rake db:migrate
rake db:seed
Also, note that seed.rb file will add these to you when you run rake db:seed
u = User.new
u.email = "glc@admin.com"
u.password = "glcsmart"
Which is Obviously the authentication for the site.
You may also run
rails c
to run the rails console and see whatever directly from the db. Example here to see the user in your db..
User.all
User.first
User.last
Note also that the user authentication system has robust features such as
current_user
can be called anywhere in rails side (eg. in the controller) and gives you the whole user story.
for more check the devise gem documentation from the above link.
Devise is a gem widely used to enhance authentication and user management system in the rails application. This task is to put devise in the system to make login and/or user related work achievable. Documentation page is https://github.com/plataformatec/devise