Skip to content

Latest commit

 

History

History
20 lines (20 loc) · 1.35 KB

week-07.md

File metadata and controls

20 lines (20 loc) · 1.35 KB
  • What is unit testing?
  • What is an rspec matcher? Give an example of one.
  • Compare and contrast a describe and a context 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 many teachers?
  • 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 your routes.rb file, what should you expect to see when you enter rake 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 and authorization.
  • 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?