justin808/fat-code-refactoring-techniques — pull request #12 by justin808 (2014-04-18 19:16:32+00:00)
Title: RailsConf: Business Logic in Model

Refactored fat, complicated, full-of-business MicropostController create action so that business logic resides in models.

* Leverage validation on Micropost
* Created method Micropost#save_with_profanity_callbacks to handle the business logic aspects.
* Considered putting this logic in the after_save hook for Micropost, but I'd rather not invoke complicated business logic from a hook.