/contacts

A rails app to demonstrate the concepts of problems with fat controllers.

Primary LanguageRuby

Rails fat controllers

This app demonstrates the pitfalls of implementing fat controllers.

Goal

  • Move code that belongs in models out of the controller.

How you'll get there

  • You'll get the model spec examples to pass
  • Use ActiveRecord methods and SQL statements to accomplish this.
  • You'll also need to create a couple of migrations! :shipit:

Before you start

After you've forked and cloned this repo

  • Run rake db:migrate && rake db:test:prepare at the terminal
  • Run rake db:seed at the terminal to populate the db with seed data
    • Take a look at the file db/seeds.rb to see how this actually works

##Get the specs to pass for

Person.all_email_domains

Person.find_all_with_email_domain

Resources used

Thanks http://www.briandunning.com/sample-data/ for the sample data!