- screenshots of scores will be posted in comments
- screenshots of completed sections will be posted in comments
Natalia: Extraction and analysis of information from files. Remember to do TDD
Charlie: Keep it organized. Aim for fully functional.
new_user_path
UsersController
with new actionnew.html.erb
password_digest
string fieldgem 'bcrypt'
in Gemfile and add has_secure_password
in User modelcreate
action in UsersControllersession[:user_id]
in create actionAuthentication is to verify that the user is who he says he is; Authorization is to validate if the user can access certain paths/actions or not (what do you have privilege to).
They are both needed because they validate different things inside an application, so we want the right people to access the right information.
By default, Rails applications build URLs based on the primary key -- the id
column from the database. Imagine we have a Person
model and associated controller. We have a person record for Bob Martin
that has id
number 6
. The URL for his show page would be:
/people/6
But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6
here, is called the "slug". Let's look at a few ways to implement better slugs.
This tutorial will help guide you through the process of setting up a new Ruby on Rails project with robust testing capabilities. This tutorial makes a couple of assumptions:
Fork this respository. Answer the questions to the best of your ability. Try to answer them with limited amount of external research. These questions cover the majority of what we've learned this week (which is a TON!).
Note: When you're done, submit a PR.
json
, what does it stand for, and why is it important?joins
and includes
in ActiveRecord?Fork this gist and answer these questions to reflect on your learning experiences.
I wanted to change into a career that would allow me to have different challenges constantly, where I could problem solve and build solutions for others in an efficient way. I chose Turing because in my experience, it's not just about how good you are, it's also about how well you work with others and I was really happy to see that Turing is focused on not just teaching you to code, but to be part of a community and to collaborate with others (which I believe it's the most important factor in any job).
Ref : stackoverflow
The best solution in my opinion is to use the unittest
[command line interface][1] which will add the directory to the sys.path
so you don't have to (done in the TestLoader
class).
For example for a directory structure like this:
new_project
├── antigravity.py