diff options
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 |