Episode 14 - Filtering Search Results


Click on image above for a preview

Released: Jan 13, 2010, Running time: 60 min

In this episode:

We add the capability to filter search results based on the brand they belong to and the source they came from.

Tags: rspec, cucumber, mockups, model, controller, twitter, search

Add to cart$5.00
  • Share

Now that we have multiple sources of search results, it would be nice if we could only look at results from Twitter or from Google Blog Search or only look at results for a certain brand.

To make this happen, we add a couple of drop-downs to the dashboard, allowing us to select the brand and the source we want to filter by.

Both filters are added in the same way:

  1. write a scenario that gives us search results for more than one brand (or search);
  2. add the drop-down to the view;
  3. make the controller pass filter parameters on to the model’s finder method;
  4. write specs to ask the model to only return results filtered by the specified options;
  5. make the model specs pass.

Finally, we test our work in the browser and commit.


  • Vlcsnap-2010-01-13-12h43m39s7
  • Vlcsnap-2010-01-13-12h43m32s181
  • Vlcsnap-2010-01-13-12h45m45s223
  • Vlcsnap-2010-01-13-12h53m48s205
  • Vlcsnap-2010-01-13-12h54m34s153
  • Vlcsnap-2010-01-13-12h55m56s205
  • Vlcsnap-2010-01-13-12h57m08s161
  • Vlcsnap-2010-01-13-12h57m40s215
  • Vlcsnap-2010-01-13-12h59m02s20
  • Vlcsnap-2010-01-13-12h59m56s6
  • Vlcsnap-2010-01-13-13h01m01s179

1 comment

the sound isnt that good lads :) It is sometimes off sometimes on…. can it by my computer?

Commenting is disabled.