Advanced Active Record Techniques: Best Practice Refactoring

Location: Portland Ballroom 252 Level: Intermediate
Average rating: ****.
(4.19, 16 ratings)

This talk will cover several of the more advanced Active Record features by presenting extensive code samples and walking the audience through a best practice refactoring of that code, using the tools given to us by Active Record in the most effective manner (the ‘Rails way’). Some of the topics that these refactoring examples will touch on include

  • Moving complexity and logic from Controllers and Views into Models
  • Common domain patterns (authorization, polymorphic associations, etc)
  • Effective use of Callbacks and Observers
  • Correct use of validations
  • Custom getters and setters
  • Introspection
  • Various ways of extending Active Record
  • Packaging your extensions as plugins and gems
Photo of Chad Pytel

Chad Pytel

thoughtbot, inc.

Chad Pytel is president of thoughtbot, inc. a web application development firm which focuses exclusively on Ruby on Rails. He is also co-author of “Pro Active Record: Databases with Ruby and Rails”, published by Apress, and he publishes, along with the rest of the team at thoughtbot, the blog GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS.

News and Coverage
co-presented by Ruby Central, Inc. O'Reilly
  • Engine Yard
  • Sun Microsystems
  • FiveRuns
  • GotThingsDone
  • Heroku
  • ThoughtWorks
  • Atlantic Dominion Solutions
  • Blue Box Group
  • CodeGear
  • E-xact
  • ELC Technologies
  • EnterpriseDB
  • GemStone Systems
  • Intridea
  • Morph Labs
  • RightScale
  • TechRepublic

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at RailsConf, contact Yvonne Romaine.

Download the RailsConf Sponsor/Exhibitor Prospectus

Media and Promotional Opportunities

Download the Media & Promotional Partner Brochure (PDF) for more information on trade opportunities with O'Reilly conferences, or contact mediapartners@

Program Ideas

Post your suggestions for speakers, topics, and activities on the RailsConf wiki or send an email to

Press and Media

For media-related inquiries, contact

Contact Us

View a complete list of RailsConf 2008 contacts.