Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

Service Objects

#398 Service Objects pro

Dec 18, 2012 | 12 minutes | Refactoring, Controllers, Rails 4.0
Models can quickly become a grab-bag of unrelated methods if behavior is constantly being pushed from the controller. Here I show how to refactor this using Concerns and Service Objects.
  • Download:
  • source codeProject Files in Zip (125 KB)
  • mp4Full Size H.264 Video (34.4 MB)
  • m4vSmaller H.264 Video (18.2 MB)
  • webmFull Size VP8 Video (17.8 MB)
  • ogvFull Size Theora Video (47.4 MB)