This commit is contained in:
gitlabhq 2011-10-15 18:51:58 +03:00
parent 4e063deaa9
commit a9d224d36d
3 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,8 @@ class ProjectsController < ApplicationController
before_filter :authorize_read_project!, :except => [:index, :new, :create]
before_filter :authorize_admin_project!, :only => [:edit, :update, :destroy]
before_filter :require_non_empty_project, :only => [:blob, :tree]
def index
@projects = current_user.projects.all
end
@ -48,7 +50,7 @@ class ProjectsController < ApplicationController
def update
respond_to do |format|
if project.update_attributes(params[:project])
format.html { redirect_to project, notice: 'Project was successfully updated.' }
format.html { redirect_to project, :notice => 'Project was successfully updated.' }
format.js
else
format.html { render action: "edit" }