This commit is contained in:
Dmitriy Zaporozhets 2011-10-15 21:39:11 +03:00
parent 7b5799a979
commit ef2bf15204
28 changed files with 104 additions and 37 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" }