diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-18 17:43:49 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-18 17:43:49 +0300 |
commit | cc5440e82a396fe4967a0b31322d9bb67ee70057 (patch) | |
tree | 61f75b14931a80e24c365a7aa03d496376c7133d /app/controllers/snippets_controller.rb | |
parent | 68b601f6afeb435e9cfa1aa88f9db718f2d3596f (diff) | |
download | gitlab-ce-cc5440e82a396fe4967a0b31322d9bb67ee70057.tar.gz |
Use navless layout for snippets page
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index 49b740af046..b91f68aab5e 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -7,8 +7,12 @@ class SnippetsController < ApplicationController # Allow destroy snippet before_filter :authorize_admin_snippet!, only: [:destroy] + before_filter :set_title + respond_to :html + layout 'navless' + def index @snippets = Snippet.public.fresh.non_expired.page(params[:page]).per(20) end @@ -98,4 +102,8 @@ class SnippetsController < ApplicationController def authorize_admin_snippet! return render_404 unless can?(current_user, :admin_personal_snippet, @snippet) end + + def set_title + @title = 'Snippets' + end end |