From cc5440e82a396fe4967a0b31322d9bb67ee70057 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 18 Jun 2013 17:43:49 +0300 Subject: Use navless layout for snippets page --- app/controllers/snippets_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/controllers/snippets_controller.rb') 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 -- cgit v1.2.1