diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-05-01 10:39:11 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-05-01 10:39:16 +0200 |
commit | 92fd3ccee05acdfd5e498734ed287458a8dd21a3 (patch) | |
tree | a794a8017636ce7f50a7f4ef4201395894a5451e /app/controllers/snippets_controller.rb | |
parent | ae09c2a6db0d15caedc080c319add147c79fd02a (diff) | |
download | gitlab-ce-92fd3ccee05acdfd5e498734ed287458a8dd21a3.tar.gz |
Add helpers for header title and sidebar, and move setting those from controllers to layouts.
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index c960724b47a..cf672c5c093 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -7,10 +7,9 @@ class SnippetsController < ApplicationController # Allow destroy snippet before_action :authorize_admin_snippet!, only: [:destroy] - before_action :set_title - skip_before_action :authenticate_user!, only: [:index, :user_index, :show, :raw] + layout 'snippets' respond_to :html def index @@ -96,12 +95,6 @@ class SnippetsController < ApplicationController return render_404 unless can?(current_user, :admin_personal_snippet, @snippet) end - def set_title - @title = 'Snippets' - @title_url = snippets_path - @sidebar = "snippets" - end - def snippet_params params.require(:personal_snippet).permit(:title, :content, :file_name, :private, :visibility_level) end |