diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-06-02 10:20:37 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-06-03 11:37:23 +0200 |
commit | 79f8abc51fa876e12de4150ab3ec489208aaed84 (patch) | |
tree | efe41847c777590c7e57edfe63549360c47dae73 /app/controllers/snippets_controller.rb | |
parent | 90c2e0d971b5c105224196b8509012f943c9ea9b (diff) | |
download | gitlab-ce-79f8abc51fa876e12de4150ab3ec489208aaed84.tar.gz |
Replace snippets scopes in view and controller.
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index 59ad8ff907c..89edd9fd7e1 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -26,15 +26,15 @@ class SnippetsController < ApplicationController if @user == current_user @snippets = case params[:scope] - when 'public' then - @snippets.public - when 'private' then - @snippets.private + when 'is_public' then + @snippets.is_public + when 'is_private' then + @snippets.is_private else @snippets end else - @snippets = @snippets.public + @snippets = @snippets.is_public end @snippets = @snippets.page(params[:page]).per(20) |