Changeset 60
- Timestamp:
- 12/03/07 22:43:57 (12 months ago)
- Location:
- trunk/app/controllers
- Files:
-
- 9 modified
-
deployments_controller.rb (modified) (2 diffs)
-
hosts_controller.rb (modified) (3 diffs)
-
project_configurations_controller.rb (modified) (3 diffs)
-
projects_controller.rb (modified) (3 diffs)
-
recipes_controller.rb (modified) (3 diffs)
-
roles_controller.rb (modified) (3 diffs)
-
stage_configurations_controller.rb (modified) (3 diffs)
-
stages_controller.rb (modified) (4 diffs)
-
users_controller.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/deployments_controller.rb
r59 r60 45 45 @deployment.deploy_in_background! 46 46 47 format.html { redirect_to project_stage_deployment_ path(@project, @stage, @deployment)}47 format.html { redirect_to project_stage_deployment_url(@project, @stage, @deployment)} 48 48 format.xml { head :created, :location => project_stage_deployment_url(@project, @stage, @deployment) } 49 49 else … … 61 61 respond_to do |format| 62 62 flash[:notice] = 'A deployment is currently not possible.' 63 format.html { redirect_to project_stage_ path(@project, @stage) }63 format.html { redirect_to project_stage_url(@project, @stage) } 64 64 format.xml { render :xml => current_stage.deployment_errors.to_xml } 65 65 false -
trunk/app/controllers/hosts_controller.rb
r59 r60 43 43 if @host.save 44 44 flash[:notice] = 'Host was successfully created.' 45 format.html { redirect_to host_ path(@host) }46 format.xml { head :created, :location => host_ path(@host) }45 format.html { redirect_to host_url(@host) } 46 format.xml { head :created, :location => host_url(@host) } 47 47 else 48 48 format.html { render :action => "new" } … … 60 60 if @host.update_attributes(params[:host]) 61 61 flash[:notice] = 'Host was successfully updated.' 62 format.html { redirect_to host_ path(@host) }62 format.html { redirect_to host_url(@host) } 63 63 format.xml { head :ok } 64 64 else … … 77 77 respond_to do |format| 78 78 flash[:notice] = 'Host was successfully deleted.' 79 format.html { redirect_to hosts_ path}79 format.html { redirect_to hosts_url } 80 80 format.xml { head :ok } 81 81 end -
trunk/app/controllers/project_configurations_controller.rb
r59 r60 32 32 if @configuration.save 33 33 flash[:notice] = 'ProjectConfiguration was successfully created.' 34 format.html { redirect_to project_ path(current_project) }35 format.xml { head :created, :location => project_ path(current_project) }34 format.html { redirect_to project_url(current_project) } 35 format.xml { head :created, :location => project_url(current_project) } 36 36 else 37 37 format.html { render :action => "new" } … … 49 49 if @configuration.update_attributes(params[:configuration]) 50 50 flash[:notice] = 'ProjectConfiguration was successfully updated.' 51 format.html { redirect_to project_ path(current_project) }51 format.html { redirect_to project_url(current_project) } 52 52 format.xml { head :ok } 53 53 else … … 66 66 respond_to do |format| 67 67 flash[:notice] = 'ProjectConfiguration was successfully deleted.' 68 format.html { redirect_to project_ path(current_project) }68 format.html { redirect_to project_url(current_project) } 69 69 format.xml { head :ok } 70 70 end -
trunk/app/controllers/projects_controller.rb
r59 r60 54 54 if @project.save 55 55 flash[:notice] = 'Project was successfully created.' 56 format.html { redirect_to project_ path(@project) }57 format.xml { head :created, :location => project_ path(@project) }56 format.html { redirect_to project_url(@project) } 57 format.xml { head :created, :location => project_url(@project) } 58 58 else 59 59 format.html { render :action => "new" } … … 71 71 if @project.update_attributes(params[:project]) 72 72 flash[:notice] = 'Project was successfully updated.' 73 format.html { redirect_to project_ path(@project) }73 format.html { redirect_to project_url(@project) } 74 74 format.xml { head :ok } 75 75 else … … 88 88 respond_to do |format| 89 89 flash[:notice] = 'Project was successfully deleted.' 90 format.html { redirect_to projects_ path}90 format.html { redirect_to projects_url } 91 91 format.xml { head :ok } 92 92 end -
trunk/app/controllers/recipes_controller.rb
r59 r60 42 42 if @recipe.save 43 43 flash[:notice] = 'Recipe was successfully created.' 44 format.html { redirect_to recipe_ path(@recipe) }45 format.xml { head :created, :location => recipe_ path(@recipe) }44 format.html { redirect_to recipe_url(@recipe) } 45 format.xml { head :created, :location => recipe_url(@recipe) } 46 46 else 47 47 format.html { render :action => "new" } … … 59 59 if @recipe.update_attributes(params[:recipe]) 60 60 flash[:notice] = 'Recipe was successfully updated.' 61 format.html { redirect_to recipe_ path(@recipe) }61 format.html { redirect_to recipe_url(@recipe) } 62 62 format.xml { head :ok } 63 63 else … … 76 76 77 77 respond_to do |format| 78 format.html { redirect_to recipes_ path}78 format.html { redirect_to recipes_url } 79 79 format.xml { head :ok } 80 80 end -
trunk/app/controllers/roles_controller.rb
r59 r60 33 33 if @role.save 34 34 flash[:notice] = 'Role was successfully created.' 35 format.html { redirect_to project_stage_ path(@project, @stage) }36 format.xml { head :created, :location => project_stage_ path(@project, @stage) }35 format.html { redirect_to project_stage_url(@project, @stage) } 36 format.xml { head :created, :location => project_stage_url(@project, @stage) } 37 37 else 38 38 format.html { render :action => "new" } … … 50 50 if @role.update_attributes(params[:role]) 51 51 flash[:notice] = 'Role was successfully updated.' 52 format.html { redirect_to project_stage_ path(@project, @stage) }52 format.html { redirect_to project_stage_url(@project, @stage) } 53 53 format.xml { head :ok } 54 54 else … … 67 67 respond_to do |format| 68 68 flash[:notice] = 'Role was successfully deleted.' 69 format.html { redirect_to project_stage_ path(@project, @stage) }69 format.html { redirect_to project_stage_url(@project, @stage) } 70 70 format.xml { head :ok } 71 71 end -
trunk/app/controllers/stage_configurations_controller.rb
r59 r60 32 32 if @configuration.save 33 33 flash[:notice] = 'StageConfiguration was successfully created.' 34 format.html { redirect_to project_stage_ path(@project, @stage) }35 format.xml { head :created, :location => project_stage_ path(@project, @stage) }34 format.html { redirect_to project_stage_url(@project, @stage) } 35 format.xml { head :created, :location => project_stage_url(@project, @stage) } 36 36 else 37 37 format.html { render :action => "new" } … … 49 49 if @configuration.update_attributes(params[:configuration]) 50 50 flash[:notice] = 'StageConfiguration was successfully updated.' 51 format.html { redirect_to project_stage_ path(@project, @stage) }51 format.html { redirect_to project_stage_url(@project, @stage) } 52 52 format.xml { head :ok } 53 53 else … … 66 66 respond_to do |format| 67 67 flash[:notice] = 'StageConfiguration was successfully deleted.' 68 format.html { redirect_to project_stage_ path(@project, @stage) }68 format.html { redirect_to project_stage_url(@project, @stage) } 69 69 format.xml { head :ok } 70 70 end -
trunk/app/controllers/stages_controller.rb
r59 r60 44 44 if @stage.save 45 45 flash[:notice] = 'Stage was successfully created.' 46 format.html { redirect_to project_stage_ path(current_project, @stage) }47 format.xml { head :created, :location => project_stage_ path(current_project, @stage) }46 format.html { redirect_to project_stage_url(current_project, @stage) } 47 format.xml { head :created, :location => project_stage_url(current_project, @stage) } 48 48 else 49 49 format.html { render :action => "new" } … … 61 61 if @stage.update_attributes(params[:stage]) 62 62 flash[:notice] = 'Stage was successfully updated.' 63 format.html { redirect_to project_stage_ path(current_project, @stage) }63 format.html { redirect_to project_stage_url(current_project, @stage) } 64 64 format.xml { head :ok } 65 65 else … … 78 78 respond_to do |format| 79 79 flash[:notice] = 'Stage was successfully deleted.' 80 format.html { redirect_to project_ path(current_project) }80 format.html { redirect_to project_url(current_project) } 81 81 format.xml { head :ok } 82 82 end … … 101 101 @stage.recipe_ids = params[:stage][:recipe_ids] rescue [] 102 102 flash[:notice] = "Stage recipes successfully updated." 103 redirect_to project_stage_ path(current_project, @stage)103 redirect_to project_stage_url(current_project, @stage) 104 104 else 105 105 respond_to do |format| -
trunk/app/controllers/users_controller.rb
r59 r60 23 23 if @user.save 24 24 flash[:notice] = "Account created" 25 format.html { redirect_to user_ path(@user) }26 format.xml { head :created, :location => user_ path(@user) }25 format.html { redirect_to user_url(@user) } 26 format.xml { head :created, :location => user_url(@user) } 27 27 else 28 28 format.html { render :action => "new" } … … 63 63 if @user.save 64 64 flash[:notice] = 'User was successfully updated.' 65 format.html { redirect_to user_ path(@user) }65 format.html { redirect_to user_url(@user) } 66 66 format.xml { head :ok } 67 67 else … … 86 86 respond_to do |format| 87 87 flash[:notice] = message 88 format.html { redirect_to users_ path}88 format.html { redirect_to users_url } 89 89 format.xml { head :ok } 90 90 end … … 108 108 return true 109 109 else 110 redirect_to home_ path110 redirect_to home_url 111 111 return false 112 112 end
