- What is unit testing?
- What is an rspec matcher? Give an example of one.
- Compare and contrast a
describe
and acontext
block in rspec. - You want to set a breakpoint in your Rails application, walk through the steps you'd take in order to do this.
- How can you tell rails to create a controller and the associated files?
- What are 'strong' params?
- What is the Rails Asset Pipeline and what does it do for us?
- What is BCrypt and why is it useful
- How would you setup a database so that a
student
can have manyteachers
? - What does
has_and_belongs_to_many
do in a model? - Explain what
has_secure_password
does. - Explain the purpose of having validations? Give an example of two validations.
- Why are partials useful and how do we denote a
.erb
file is a partial? - If you type
resource :cats
into yourroutes.rb
file, what should you expect to see when you enterrake routes
into the console. - How do we login a user in Rails using the
session
hash? How about a logout? - What is the best way to store passwords in a database. What should we be careful NOT to do?
- Describe the difference between
authentication
andauthorization
. - What is the flash hash, why is it useful?
- If we are trying to save a user, but certain validations prevent us from doing so, how can figure out what the issue is?
- What is the session hash, why is it useful?