factorize before_filters and layout for projects related controllers
This commit is contained in:
parent
0439387be0
commit
078a8f0e66
17 changed files with 33 additions and 101 deletions
|
@ -1,10 +1,5 @@
|
|||
class SnippetsController < ApplicationController
|
||||
before_filter :project
|
||||
class SnippetsController < ProjectController
|
||||
before_filter :snippet, only: [:show, :edit, :destroy, :update, :raw]
|
||||
layout "project"
|
||||
|
||||
# Authorize
|
||||
before_filter :add_project_abilities
|
||||
|
||||
# Allow read any snippet
|
||||
before_filter :authorize_read_snippet!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue