Removed code duplication.
Upgraded to Rails 3.2.11