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,11 +1,9 @@
require 'github/markup'
class RefsController < ApplicationController
class RefsController < ProjectController
include Gitlab::Encode
before_filter :project
# Authorize
before_filter :add_project_abilities
before_filter :authorize_read_project!
before_filter :authorize_code_access!
before_filter :require_non_empty_project
@ -14,8 +12,6 @@ class RefsController < ApplicationController
before_filter :define_tree_vars, only: [:tree, :blob, :blame, :logs_tree]
before_filter :render_full_content
layout "project"
def switch
respond_to do |format|
format.html do