Coder Social home page Coder Social logo

co-squared's Introduction

co-squared's People

Contributors

alexkuang avatar leikahing avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

co-squared's Issues

Create and finalize the User and Role models

Users are the people who are registered with a specific blog. Each user is also associated with various roles (like writer, administrator, moderator, etc. etc.).

User model should have fields for at least the basics:

  • user name - for logging in (can default to email)
  • email
  • first name
  • last name
  • password - This should be the hash of the password. bcrypt is probably a really good choice here because it's a slow algorithm and should be much more resilient to attack than straight hashing via SHA or what have you.
  • active - whether a user is active or not
  • creation date - when this user was created
  • last_login - keeping track of when this user last logged in

Has a relation to Role. As a user can be bound to many roles. This is a has-and-belongs-to-many relationship.

Role model is going to be rather simple, to start it can probably look like this:

  • role_id - some constant ID identifying this role
  • name - The user friendly name of this role
  • description - An explanation of what this role is

This task does not consider a system that features custom roles, as there is zero driver for such a system at this time.

Switch over to using Padrino

The basic Sinatra/HAML/SASS/etc. experimentation is over, let's move over to Padrino to escape the boiler plate.

Means changing the Gemfiles, at least, and perhaps changing up some of the model code and application base.

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.