Advanced Web Applications

Week 4: Model Relationships

  • How do we create a scaffold? What does it do?
  • What are the steps to adding a gem to your application?
  • How do we add validations for our form and model?
  • How do we modify the database?
  • What is a before/after action?
  • If I wanted a method to be available from all controllers and views, how can I make that happen?
  • How do I query the database?

In relational database design, what are the different types of relationship a table can have to another?

  • one to one
  • one to many
  • many to many
Rails Gude to ActiveRecord Associations