Session

How to Avoid Derailing Yourself in Rails: a Discussion of Common Pitfalls

Gabriel Gironda, Web Developer, Rosetta Stone

Date: Sunday, May 20
Time: 11:45am - 12:35pm
Location: Oregon Ballroom 204

Rails is an extremely well-designed framework built using a wonderful object-oriented language; however, like all things powerful, Rails gives you a whole spool of rope with which to hang yourself. This presentation will solve real-world problems twice: once with a commonly misused idiom and again with a better designed solution.

Topics addressed in this presentation include:

  • Single table inheritance (STI), and how to refactor a bad STI decision into multiple tables
  • Controller inheritance, and how to refactor a bloated application.rb into multiple controllers and modules
  • View inheritance, or how to use "render :template" and "render :action" less
  • Breakage of encapsulation, and how the tight binding of ActionView and ActionController sometimes leads to View in your Controller (and chocolate in your peanut butter)
  • Metadata vs. hard-coding data, and how to use YAML configuration effectively to remove configuration options from code.

Conference News and Coverage