dandydanny / 383_skills_and_proficiencies

DBC Mock Assessment 2 - Pt 1. Sinatra+ActiveRecord: Users, Skills, and Proficiencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Objectives

For this challenge, you'll be adding some new functionality to a very basic Sinatra+ActiveRecord application. The application in its current form includes:

  • a User model (along with sign-in and sign-up functionality)
  • a Skill model (representing a skill that a user might have)

Your task is to add the notion of "proficiency" to the application. A user can have many skills, and a skill can belong to many users. A "proficiency" is an association between Users and Skills, and has the following additional required attributes:

  • years of experience
  • a flag tracking whether or not the user has formal education for the given skill

You'll need to provide an interface in the application for users to select the skills that they have. How you choose to provide this interface is up to you, but a user should only be able to edit her own skills, not the skills of other users.

Also, the home page of your application should simply show each user, along with each of her skills, how many years experience she has with said skill, and whether or not she's been formally educated in that skill. For example:

<style> tr.new-user { border-top: 1px dotted grey; } th { text-align: left; } td { padding-right: 40px; } </style>
NameSkillYearsFormal?
Amanda HuggenkyssRuby (technical)1yes
JavaScript (technical)2yes
Ben DoverIllustrator (creative)5no
CSS (technical)3no

Skeleton Code

You should start with this applicaiton skeleton.

Useful Notes / Tidbits

  • What's the right kind of association between User and Skill?
  • Validations on boolean fields can be tricky.
  • Before implementing a manual way to add new proficiencies for a user, you might try adding some through your seeds.rb file.

About

DBC Mock Assessment 2 - Pt 1. Sinatra+ActiveRecord: Users, Skills, and Proficiencies


Languages

Language:Ruby 56.8%Language:CSS 41.7%Language:JavaScript 1.5%