Permalink
Browse files

filtering-stories-by-status-controller

If you try to use the filter widget, you'll see it adds a `status` parameter in the query string. We need to pick that up and do something useful with it in the Projects controller at `app/controllers/projects_controller.rb`.  To do so, we will use an [association scope](/manual/scopes#association_scopes).

SHOW_PATCH

Status filtering should now be working.
  • Loading branch information...
bryanlarsen authored and iox committed Jun 3, 2013
1 parent da669bc commit 2b18116b2d039bec4b335a5af0ebca88e1d86990
Showing with 1 addition and 0 deletions.
  1. +1 −0 app/controllers/projects_controller.rb
@@ -9,6 +9,7 @@ def show
@stories = @project.stories.
search(params[:search], :title).
order_by(parse_sort_param(:title, :status))
@stories = @stories.status_is(params[:status]) if params[:status] && !params[:status].blank?
hobo_show
end

0 comments on commit 2b18116

Please sign in to comment.