Coder Social home page Coder Social logo

master-rater's Introduction

Readme

Instructions to run app on Cloud9

  1. Create a new Cloud9 instance with the "Blank" template
  2. curl -fsSL c9setup.saasbook.info | bash --login && rvm use 2.3.0 --default
  3. git clone [email protected]:it484-muzak/master-rater.git
  4. Change directory into the app directory cd master-rater
  5. gem install rails -v 4.2.6
  6. bundle install
  7. Migrate the database: rake db:migrate
  8. Seed the database: rake db:seed
  9. Run the app: rails s -p $PORT -b $IP

Commands for development

  • To delete all database data and rebuild it:

    rake db:drop db:migrate db:seed

  • To manually query the ActiveRecords (i.e. Artists):

    1. rails console
    2. Artist.all <- To see all Artists
    3. Artist.where("name = 'Defeater'") <- To search for a specific record. Returns a list of results, even if there's only one.

Creating a new route, controller and haml view

  • Creating the route: Modifying the /config/routes.rb file: Example:

    1. root 'pages#show
    2. root is the subdirectory to follow
    3. pages is the controller
    4. show is the action to perform
  • Creating a new controller for the route Running the following command will give us a new controller and .erb files for our route:

    1. rails generate controller pages new create update edit destroy index show
    2. rails generate controller should stay unmodified
    3. pages is the route name to create the controller for
    4. new specifies that we want to create a new controller
    5. create update edit destroy index show are the actions our controller will have
  • Converting default controller generated .erb to .haml files

    1. Run the following rake command rake haml:erb2haml
    2. Enter 'y' when prompted to remove the .erb files

Helpful Articles

master-rater's People

Contributors

sa7mon avatar aarondingman avatar ayodele-olufemi avatar

Watchers

James Cloos avatar  avatar  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.