RailsCasts Pro episodes are now free!

Learn more or hide this

Anonymous Scopes

#112 Anonymous Scopes

Jun 02, 2008 | 8 minutes | Active Record, Rails 2.1
The scoped method allows you to generate named scopes on the fly. In this episode I show how to use anonymous scopes to improve the conditional logic which was used in the previous episode on advanced search form.
  • Download:
  • mp4Full Size H.264 Video (16.2 MB)
  • m4vSmaller H.264 Video (10 MB)
  • webmFull Size VP8 Video (27 MB)
  • ogvFull Size Theora Video (24.1 MB)