The status code can only be declared in return commands such as render, redirect_to .... and will affect this return command, there is no way to set the code for all responses
format.html { redirect_to(@medium, :notice => 'Medium was successfully created.'); }, , 3XX,
format.xml { render :xml => @medium, :status => :created, :location => @medium; } , , 201, , 200, :
format.xml { render :xml => @medium, :status => :ok, :location => @medium; }