Giter VIP home page Giter VIP logo

workshops's Introduction

Workshops application

Hi! We think it’s great that you want to join along with Netguru to start learning Ruby on Rails. Taking part in workshops is also a great opportunity to start an internship with us and become one of the Netguru folks. Since you have just taken your first step on your adventure with programming in RoR, we challenge you to complete the following task. Ready, steady…Go!

Let’s start with a setup:

Database

Copy the database config file (and edit if needed): cp config/database.yml.sample config/database.yml

Make sure the user you've listed in database.yml is created for postgres: createuser -s -r workshops

Setup the database for your application (development and test environments): bin/rake db:setup bin/rake db:test:prepare

Issues to solve:

  1. There are a few missing fields on the User model. Make sure spec/models/user_spec.rb passes.

  2. Make sure settings for devise are configured properly. If they aren’t, most of the controller specs will fail:

  • Most of the configuration changes require the server to be restarted.
  • At some point you'll have to overwrite the default devise views - you can find all the required info in the gem readme.
  1. Check spec/controllers/categories_controller_spec.rb - there should be a couple errors on actions checking admin presence.

  2. Next up: Product model and spec/models/product_spec.rb. Play with validations a bit, calculate average rating and you'll be good to go.

  3. Fix specs for Category model.

  4. Fix specs for Review model.

  5. You'll have to deal with ProductsController. Again, you'll have to check for permissions. Only a product owner should be able to make changes. Make sure to give the user a proper message when they try to perform forbidden actions.

  6. Make sure ReviewDecorator is used properly, There's one action which needs to be declared there. See spec/decorators/review_decorator_spec.rb for details.

  7. Check if each review is assigned to user who wrote it.

  8. If some actions (like links to edit a page, create a new one) are not allowed for a particular user then please hide them in a template (for example with if).

  9. In navigation bar insert links for guest users to login / signup and for users that are already logged in - to logout.

  10. Don't forget to check if application works in the browser :).

  11. Unleash your design skills. Add some CSS to the application to make it prettier (we won't say it's ugly, but you know, it's not a beauty [YET!]). Please use Bootstrap 3 for styling, which is already added to application. Psss! Don't forget about styling devise views :).

  12. Create user profile page (using Boostrap 3). Use your imagination about what should go there. You can start with name, email, etc.

  13. On user profile list 5 last user's reviews with formated date (dd-mm-yy).

  14. Fill seeds.rb with 5 accounts for user and one admin account to login and example category with products and reviews.

  15. Make sure your project is available on Heroku with seeds data.

What disqualifies your application

  1. Tests are not passing.

  2. Website doesn't work on Heroku.

  3. Design is not finished.

Here are some great resources to help you with kicking off your adventure with Ruby and Rails:

Good Luck!

We want all attendees at netguru workshops to have an awesome harassment-free experience. Read our full code of conduct for more details.

workshops's People

Contributors

blazeblazeblaze avatar jacekbrozek avatar lubieniebieski avatar olabee avatar

Watchers

 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.