Coder Social home page Coder Social logo

rails_exercises's Introduction

Rails Exercises

This collection of exercises is for Turing students to practice Ruby on Rails concepts in isolation.

Setup

  1. Clone this repository
  2. Run bundle from the command line

Exercises Setup

Currently, these exercises are included in this repo:

  • controllers
  • models
  • routes

Each group of exercises is located on a branch. In order to access these exercises, checkout out the branch (git checkout controllers). Note, if you list your branches using git branch, you will not see the branches listed at first. That's to be expected! You will still be able to check them out. Once you check out a branch, it will appear in your list of branches.

When switching between exercises on different branches, you may need to commit or stash your changes in order to checkout a new exercise branch. Don't be afraid to commit! Your changes will only be saved locally and will not affect the exercises for other students.

Some exercises contain database migrations, so apply them with:

rails db:create
rails db:migrate

If you get a message saying the database already exists when running rails db:create, first drop the database with rails db:drop.

Completing the Exercises

Each group of exercises has tests under spec/features and/or spec/models. Each test file begins with a number (ex: 1dog_spec.rb). This number indicates the order in which you should complete the tests.

Run the tests individually with rspec spec/models/1dog_spec.rb for example. You can also skip tests by changing it blocks to xit which will be helpful for narrowing your focus. Additionally, you can run a specific test with rspec spec/models/1dog_spec.rb:xyz where xyz refers to the line number in the test file where the it is located.

Contributing

If you find any bugs or have suggestions, we'd love to hear them! You can email [email protected] or slack @Brian Zanti in the Turing Slack Workspace.

rails_exercises's People

Contributors

brianzanti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rails_exercises's Issues

Lock is broken

I am currently a mentor and I was helping a student get this project setup. It looks like it just needs an updated lock file to get pushed up. The old one will no longer bundle. I can put in a PR with an updated one later if you like.

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.