Coder Social home page Coder Social logo

game_of_thrones's Introduction

Houses of Westeros

When you play the Game of Rails, you win or you die.

You'll be making a Ruby on Rails app connecting Game of Thrones characters to their respective houses. Implement full CRUD functionality on the models.

We will start off with two models: Houses and Characters. Houses have many characters. Characters belong to a single house.

The styling of the app is completely up to you. With that said, a cool GoT themed font has been included in this repository for you to integrate if you choose. To add it, in your application.css file, add the following:

@font-face {
  font-family: "thrones";
  src: font-url('game_of_thrones.ttf') format("truetype");
}

Models and Migrations

  • Create an ERD for your houses and characters tables
  • Create corresponding models and migrations
  • Create seed data that generates some houses and characters

Use this wiki or this diagram if you need some source material for your seed file. Or just make up some names!

Views and Controllers

  • Add controllers and views for to allow for full CRUD functionality for both of your models.
  • Add styling to your app by adding / modifying stylesheets in app/assets/stylesheets

Bonus: User Authentication

Once -- and only after -- you have completed all of the above and implemented full CRUD functionality for Houses and Characters, add a third User model using Devise.

  • You should be able to sign up, sign in and sign out of the app
  • Only logged-in users should be able to create a House or Character
  • A user can only update or delete a House or Character he/she created

Think about what associations you will have to set up in order to implement these features

Some More Bonuses

  • Add a third model for quotes associated with a character.
  • Try out many-to-many relationships with Categories to label Characters. A Character can have many Categories (e.g., "merciless") and a Category can be associated with many Characters. A Tag model/table could be helpful here...
  • Create an admin role (i.e., somebody who can update/delete anything) using CanCanCan.
  • Add a COMBAT MODE using custom routes and controllers (models are not necessary for this feature, but certainly could be used to implement it)

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.