This is the fifth project of the Main Rails curriculum at Microverse - @microverseinc
- The objective is to build and implement an authentication system so users can only access areas of a site they are authorized to.
- The main focus will be on data and function as there will be less focus on the styling
- Post `belongs_to` User
- User `has_many` posts
No validations is set for both the User and Post model User model have the has_
- Clone the repo and run the app.
$ git clone git@github.com:bolah2009/members-only.git
$ cd members-only
bundle install
rails db:migrate
rails db:seed
rails console
> user = User.create(:name => "Chief", :email => "chief@email.com", :password => "password", :password_confirmation => "password")
> user.authenticate("wrongpassword")
=> false
> user.authenticate("password")
=> #<User id: 1, name: "Chief", email: "chief@email.com", password_digest: "$2a$10$9Lx...", created_at: "2019...", updated_at: "2019...">
http://localhost:3000/
or http://localhost:3000/posts
http://localhost:3000/
or http://localhost:3000/posts
http://localhost:3000/posts/new
ruby 2.6.3p62
Rails 5.2.3