Giter Club home page Giter Club logo

members-only's Introduction

Project: Members-only (Ruby on Rails)

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

Members-only (Ruby on Rails)

More about the project

Relationship
- Post `belongs_to` User
- User `has_many` posts
Validations

No validations is set for both the User and Post model User model have the has_

Usage Instructions

Clone the project

  • Clone the repo and run the app.
$ git clone [email protected]:bolah2009/members-only.git
$ cd members-only

Run bundle install and migrate as follows:

bundle install

rails db:migrate
rails db:seed

Run the rails console

rails console

Creating a sample user and testing the #authenticate method

> user = User.create(:name => "Chief", :email => "[email protected]", :password => "password", :password_confirmation => "password")
> user.authenticate("wrongpassword")
=> false
> user.authenticate("password")
=> #<User id: 1, name: "Chief", email: "[email protected]", password_digest: "$2a$10$9Lx...", created_at: "2019...", updated_at: "2019...">

Screenshots

Show all posts (Without Author)

http://localhost:3000/ or http://localhost:3000/posts

Show all posts (Without Author)

Show all posts (With Author, logged in users)

http://localhost:3000/ or http://localhost:3000/posts Show all posts (With Author, logged in users)

Login page

http://localhost:3000/login Login Page

Create new post

http://localhost:3000/posts/new Create new post

Ruby version

ruby 2.6.3p62

Rails version

Rails 5.2.3

Authors

members-only's People

Contributors

bolah2009 avatar torres-ssf avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.