diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2015-05-03 10:28:52 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2015-05-03 10:28:52 +0200 |
commit | 0d0c539c047fdf3b7460d4044fc33a4505c1143b (patch) | |
tree | 63544c971ff0dd78dcb425f5671ff0d18bd94be9 /app/controllers/snippets_controller.rb | |
parent | 76f7bdccc09fe1290cee330480c1a2640e3b20d5 (diff) | |
parent | b3890749c0fe9e7c20f2d96bbf3a43dd76653d92 (diff) | |
download | gitlab-ce-0d0c539c047fdf3b7460d4044fc33a4505c1143b.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index a5259466cb8..cf672c5c093 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -7,14 +7,11 @@ 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 - layout :determine_layout - def index if params[:username].present? @user = User.find_by(username: params[:username]) @@ -98,16 +95,7 @@ class SnippetsController < ApplicationController return render_404 unless can?(current_user, :admin_personal_snippet, @snippet) end - def set_title - @title = 'Snippets' - @title_url = snippets_path - end - def snippet_params params.require(:personal_snippet).permit(:title, :content, :file_name, :private, :visibility_level) end - - def determine_layout - current_user ? 'snippets' : 'public_users' - end end |