diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-06-04 08:37:19 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-06-04 08:37:19 +0200 |
commit | 18b1f171bd0b9700e73c37c23150bea9fb251b3e (patch) | |
tree | 5c461f95d6b5b50b75edb4946ea8b980318e7dfe /app/controllers/snippets_controller.rb | |
parent | 84dc9cd6926ea8bc4db533e658463b4e60f68e6b (diff) | |
download | gitlab-ce-18b1f171bd0b9700e73c37c23150bea9fb251b3e.tar.gz |
Rename snippets scopes to plural names.
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index 89edd9fd7e1..4fe98f804dc 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -14,7 +14,7 @@ class SnippetsController < ApplicationController layout 'navless' def index - @snippets = Snippet.is_public.fresh.non_expired.page(params[:page]).per(20) + @snippets = Snippet.are_public.fresh.non_expired.page(params[:page]).per(20) end def user_index @@ -26,15 +26,15 @@ class SnippetsController < ApplicationController if @user == current_user @snippets = case params[:scope] - when 'is_public' then - @snippets.is_public - when 'is_private' then - @snippets.is_private + when 'are_public' then + @snippets.are_public + when 'are_private' then + @snippets.are_private else @snippets end else - @snippets = @snippets.is_public + @snippets = @snippets.are_public end @snippets = @snippets.page(params[:page]).per(20) |