Code Monkey home page Code Monkey logo

rails-internship-technical-interview's Introduction

README

Prerequisite

Make sure your laptop has working installation of:

  1. Ruby version 2.2 or above
  2. SQLite3 database
  3. RubyGems packaging system.
  4. Rails version 5.0 or above
  5. Git

Reference:

  1. https://gorails.com/setup
  2. https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
  3. https://guides.rubyonrails.org/v5.0/getting_started.html

Part 1

To start develop a new project, we need to have some data in our database so that we can test our code easily. So we need to make sure our seed file is working properly in the first place. Unfortunately some code in the seed file is broken. We will need your help to fix it.

Requirement:

  1. Check out to branch fix-broken-users-seed
  2. Fix the broken seed file db/seeds.rb
  3. Use command bundle exec rake db:seed to seed data to the database
  4. Commit the code changes to the same git branch fix-broken-users-seed

Part 2fix-broken-users-management-pages

As a good software engineer, debugging skill is very crucial. There are some code are deleted/added purposely to make some of the feature not working properly. Fortunately we write some unit test to help us idenfity which area is broken. Hence, you will need to help us fix all the bugs in current code base.

Requirement:

  1. Check out to branch fix-broken-users-management-pages
  2. Fix all the bugs that presence in user model, controller, and views.
  3. Fix missing routes in config/routes.rb
  4. Build a logic in validate user membership code format, in app/models/user.rb
  5. Commit the code changes to the same git branch fix-broken-users-management-pages

Part 3

We have new feature request now. We want to let user to create new vouchers, hence we need to store the voucher information in our database. Remember, one user can always create more than 1 voucher.

Requirement:

  1. Create a new model voucher
  2. voucher table should consists of name, expiry_at, created_at and updated_at.
  3. name value must be always unique but case insensitive.
  4. Build a one to many relationship between user and voucher models.
  5. Commit all your changes in a new git branch feature/new-user-vouchers-model.
  6. (Optional) Write unit test to make sure your code is working.

Part 4 (optional)

Is time to showcase your CSS/Javascript magic to develop a beautiful page.

There is no specific requirement for this part, You can continue from Part 3 or create a totally new page to showcase your html/css/javascript knowledge.

rails-internship-technical-interview's People

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.