Coder Social home page Coder Social logo

AceBook JAANIS

Screenshots

Project

  1. You can find the engineering project outline here.

Jaanis' Code Climate Link: https://codeclimate.com/github/Aracho1/acebook-JAANIS

REQUIRED INSTRUCTIONS:

  1. The card wall is here.

How to contribute to this project

See CONTRIBUTING.md

Quickstart

First, clone this repository. Then:

> bundle install
> bin/rails db:create
> bin/rails db:migrate

> bundle exec rspec # Run the tests to ensure it works
> bin/rails server # Start the server at localhost:3000

User Stories

User Sign Up:

As a user of ACEBOOK
So I can post something in my name
I want to sign up.

Planning:

In routes.rb:

resources: users

-> button "Sign Up" on homepage which links to users/new page - index.html.erb

-> users/new will be a form containing: -

  • email address
  • username
  • password
  • Sign Me Up

-> save user in database: id, email, username, encrypted password (encrypted password assigned to validation ticket)

-> if save didn't work, redirect back to form with error messages (assigned to validation ticket)

-> else

  • user is logged in (sessions/new)
  • redirect to user's posts page
  • receive message to say successful sign up!
Class User
Properties username, email, password
Methods < ApplicationRecord

User Table

id username email password

To create user table, we did:

bin/rails generate model User username:string email:string password:string
bin/rails db:migrate

============================

Further Research

Linking Users to Posts:

class User < ActiveRecord has many: posts end

class Post < A.... belongs_to: user end

===============================

Reminders

migration files for drop tables will need to be deleted once everyone (including Heroku) has run db:migrate

a line of code in the create posts method in the posts controller will need to be changed once we can store user details. At the moment a new user is created when a new post is created - obvs not ideal!

Acebook-Jaanis's Projects

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.