factorize before_filters and layout for projects related controllers

This commit is contained in:
Cyril 2012-09-26 01:21:37 +02:00
parent 0439387be0
commit 078a8f0e66
17 changed files with 33 additions and 101 deletions

View file

@ -1,14 +1,8 @@
class IssuesController < ApplicationController
before_filter :project
class IssuesController < ProjectController
before_filter :module_enabled
before_filter :issue, only: [:edit, :update, :destroy, :show]
helper_method :issues_filter
layout "project"
# Authorize
before_filter :add_project_abilities
# Allow read any issue
before_filter :authorize_read_issue!