Changeset 59

Show
Ignore:
Timestamp:
12/03/07 22:20:32 (12 months ago)
Author:
jweiss
Message:

use path instead of url in order to cope with prefix

Location:
trunk/app/controllers
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/deployments_controller.rb

    r1 r59  
    4545        @deployment.deploy_in_background! 
    4646 
    47         format.html { redirect_to project_stage_deployment_url(@project, @stage, @deployment)} 
     47        format.html { redirect_to project_stage_deployment_path(@project, @stage, @deployment)} 
    4848        format.xml  { head :created, :location => project_stage_deployment_url(@project, @stage, @deployment) } 
    4949      else 
     
    6161      respond_to do |format|   
    6262        flash[:notice] = 'A deployment is currently not possible.' 
    63         format.html { redirect_to project_stage_url(@project, @stage) } 
     63        format.html { redirect_to project_stage_path(@project, @stage) } 
    6464        format.xml  { render :xml => current_stage.deployment_errors.to_xml } 
    6565        false 
  • trunk/app/controllers/hosts_controller.rb

    r44 r59  
    4343      if @host.save 
    4444        flash[:notice] = 'Host was successfully created.' 
    45         format.html { redirect_to host_url(@host) } 
    46         format.xml  { head :created, :location => host_url(@host) } 
     45        format.html { redirect_to host_path(@host) } 
     46        format.xml  { head :created, :location => host_path(@host) } 
    4747      else 
    4848        format.html { render :action => "new" } 
     
    6060      if @host.update_attributes(params[:host]) 
    6161        flash[:notice] = 'Host was successfully updated.' 
    62         format.html { redirect_to host_url(@host) } 
     62        format.html { redirect_to host_path(@host) } 
    6363        format.xml  { head :ok } 
    6464      else 
     
    7777    respond_to do |format| 
    7878      flash[:notice] = 'Host was successfully deleted.' 
    79       format.html { redirect_to hosts_url } 
     79      format.html { redirect_to hosts_path } 
    8080      format.xml  { head :ok } 
    8181    end 
  • trunk/app/controllers/project_configurations_controller.rb

    r1 r59  
    3232      if @configuration.save 
    3333        flash[:notice] = 'ProjectConfiguration was successfully created.' 
    34         format.html { redirect_to project_url(current_project) } 
    35         format.xml  { head :created, :location => project_url(current_project) } 
     34        format.html { redirect_to project_path(current_project) } 
     35        format.xml  { head :created, :location => project_path(current_project) } 
    3636      else 
    3737        format.html { render :action => "new" } 
     
    4949      if @configuration.update_attributes(params[:configuration]) 
    5050        flash[:notice] = 'ProjectConfiguration was successfully updated.' 
    51         format.html { redirect_to project_url(current_project) } 
     51        format.html { redirect_to project_path(current_project) } 
    5252        format.xml  { head :ok } 
    5353      else 
     
    6666    respond_to do |format| 
    6767      flash[:notice] = 'ProjectConfiguration was successfully deleted.' 
    68       format.html { redirect_to project_url(current_project) } 
     68      format.html { redirect_to project_path(current_project) } 
    6969      format.xml  { head :ok } 
    7070    end 
  • trunk/app/controllers/projects_controller.rb

    r56 r59  
    5454      if @project.save 
    5555        flash[:notice] = 'Project was successfully created.' 
    56         format.html { redirect_to project_url(@project) } 
    57         format.xml  { head :created, :location => project_url(@project) } 
     56        format.html { redirect_to project_path(@project) } 
     57        format.xml  { head :created, :location => project_path(@project) } 
    5858      else 
    5959        format.html { render :action => "new" } 
     
    7171      if @project.update_attributes(params[:project]) 
    7272        flash[:notice] = 'Project was successfully updated.' 
    73         format.html { redirect_to project_url(@project) } 
     73        format.html { redirect_to project_path(@project) } 
    7474        format.xml  { head :ok } 
    7575      else 
     
    8888    respond_to do |format| 
    8989      flash[:notice] = 'Project was successfully deleted.' 
    90       format.html { redirect_to projects_url } 
     90      format.html { redirect_to projects_path } 
    9191      format.xml  { head :ok } 
    9292    end 
  • trunk/app/controllers/recipes_controller.rb

    r44 r59  
    4242      if @recipe.save 
    4343        flash[:notice] = 'Recipe was successfully created.' 
    44         format.html { redirect_to recipe_url(@recipe) } 
    45         format.xml  { head :created, :location => recipe_url(@recipe) } 
     44        format.html { redirect_to recipe_path(@recipe) } 
     45        format.xml  { head :created, :location => recipe_path(@recipe) } 
    4646      else 
    4747        format.html { render :action => "new" } 
     
    5959      if @recipe.update_attributes(params[:recipe]) 
    6060        flash[:notice] = 'Recipe was successfully updated.' 
    61         format.html { redirect_to recipe_url(@recipe) } 
     61        format.html { redirect_to recipe_path(@recipe) } 
    6262        format.xml  { head :ok } 
    6363      else 
     
    7676     
    7777    respond_to do |format| 
    78       format.html { redirect_to recipes_url } 
     78      format.html { redirect_to recipes_path } 
    7979      format.xml  { head :ok } 
    8080    end 
  • trunk/app/controllers/roles_controller.rb

    r1 r59  
    3333      if @role.save 
    3434        flash[:notice] = 'Role was successfully created.' 
    35         format.html { redirect_to project_stage_url(@project, @stage) } 
    36         format.xml  { head :created, :location => project_stage_url(@project, @stage) } 
     35        format.html { redirect_to project_stage_path(@project, @stage) } 
     36        format.xml  { head :created, :location => project_stage_path(@project, @stage) } 
    3737      else 
    3838        format.html { render :action => "new" } 
     
    5050      if @role.update_attributes(params[:role]) 
    5151        flash[:notice] = 'Role was successfully updated.' 
    52         format.html { redirect_to project_stage_url(@project, @stage) } 
     52        format.html { redirect_to project_stage_path(@project, @stage) } 
    5353        format.xml  { head :ok } 
    5454      else 
     
    6767    respond_to do |format| 
    6868      flash[:notice] = 'Role was successfully deleted.' 
    69       format.html { redirect_to project_stage_url(@project, @stage) } 
     69      format.html { redirect_to project_stage_path(@project, @stage) } 
    7070      format.xml  { head :ok } 
    7171    end 
  • trunk/app/controllers/stage_configurations_controller.rb

    r1 r59  
    3232      if @configuration.save 
    3333        flash[:notice] = 'StageConfiguration was successfully created.' 
    34         format.html { redirect_to project_stage_url(@project, @stage) } 
    35         format.xml  { head :created, :location => project_stage_url(@project, @stage) } 
     34        format.html { redirect_to project_stage_path(@project, @stage) } 
     35        format.xml  { head :created, :location => project_stage_path(@project, @stage) } 
    3636      else 
    3737        format.html { render :action => "new" } 
     
    4949      if @configuration.update_attributes(params[:configuration]) 
    5050        flash[:notice] = 'StageConfiguration was successfully updated.' 
    51         format.html { redirect_to project_stage_url(@project, @stage) } 
     51        format.html { redirect_to project_stage_path(@project, @stage) } 
    5252        format.xml  { head :ok } 
    5353      else 
     
    6666    respond_to do |format| 
    6767      flash[:notice] = 'StageConfiguration was successfully deleted.' 
    68       format.html { redirect_to project_stage_url(@project, @stage) } 
     68      format.html { redirect_to project_stage_path(@project, @stage) } 
    6969      format.xml  { head :ok } 
    7070    end 
  • trunk/app/controllers/stages_controller.rb

    r34 r59  
    4444      if @stage.save 
    4545        flash[:notice] = 'Stage was successfully created.' 
    46         format.html { redirect_to project_stage_url(current_project, @stage) } 
    47         format.xml  { head :created, :location => project_stage_url(current_project, @stage) } 
     46        format.html { redirect_to project_stage_path(current_project, @stage) } 
     47        format.xml  { head :created, :location => project_stage_path(current_project, @stage) } 
    4848      else 
    4949        format.html { render :action => "new" } 
     
    6161      if @stage.update_attributes(params[:stage]) 
    6262        flash[:notice] = 'Stage was successfully updated.' 
    63         format.html { redirect_to project_stage_url(current_project, @stage) } 
     63        format.html { redirect_to project_stage_path(current_project, @stage) } 
    6464        format.xml  { head :ok } 
    6565      else 
     
    7878    respond_to do |format| 
    7979      flash[:notice] = 'Stage was successfully deleted.' 
    80       format.html { redirect_to project_url(current_project) } 
     80      format.html { redirect_to project_path(current_project) } 
    8181      format.xml  { head :ok } 
    8282    end 
     
    101101      @stage.recipe_ids = params[:stage][:recipe_ids] rescue [] 
    102102      flash[:notice] = "Stage recipes successfully updated." 
    103       redirect_to project_stage_url(current_project, @stage) 
     103      redirect_to project_stage_path(current_project, @stage) 
    104104    else 
    105105      respond_to do |format| 
  • trunk/app/controllers/users_controller.rb

    r50 r59  
    2323      if @user.save 
    2424        flash[:notice] = "Account created" 
    25         format.html { redirect_to user_url(@user) } 
    26         format.xml  { head :created, :location => user_url(@user) } 
     25        format.html { redirect_to user_path(@user) } 
     26        format.xml  { head :created, :location => user_path(@user) } 
    2727      else 
    2828        format.html { render :action => "new" } 
     
    6363      if @user.save 
    6464        flash[:notice] = 'User was successfully updated.' 
    65         format.html { redirect_to user_url(@user) } 
     65        format.html { redirect_to user_path(@user) } 
    6666        format.xml  { head :ok } 
    6767      else 
     
    8686    respond_to do |format| 
    8787      flash[:notice] = message 
    88       format.html { redirect_to users_url } 
     88      format.html { redirect_to users_path } 
    8989      format.xml  { head :ok } 
    9090    end 
     
    108108      return true 
    109109    else 
    110       redirect_to home_url 
     110      redirect_to home_path 
    111111      return false 
    112112    end