Skip to content

Commit

Permalink
Projects update should have all clients list also
Browse files Browse the repository at this point in the history
  • Loading branch information
Ania committed Dec 16, 2010
1 parent 79653e9 commit 48de385
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/projects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Projects < Application
before :ensure_can_list_projects, :only => [:index]
before :load_project, :only => [:edit, :update, :destroy, :show]
before :load_projects, :only => [:index, :create]
before :load_clients, :only => [:index, :new, :create, :update]
before :load_clients, :only => [:index, :new, :create]

def index
@project = Project.new :client => Client.get(params[:client_id])
Expand Down Expand Up @@ -44,6 +44,7 @@ def update
if @project.update(params[:project]) || !@project.dirty?
redirect resource(@project)
else
@clients = Client.all
render :edit
end
end
Expand Down

0 comments on commit 48de385

Please sign in to comment.