Fixes #28: Pool reording does not work

This commit is contained in:
albert
2011-09-13 13:28:33 -04:00
parent d29287dffc
commit f63de376b7
4 changed files with 19 additions and 23 deletions

View File

@@ -31,25 +31,25 @@ class PoolsController < ApplicationController
def create
@pool = Pool.create(params[:pool])
respond_with(@pool)
respond_with(@pool, :notice => "Pool created")
end
def update
@pool = Pool.find(params[:id])
@pool.update_attributes(params[:pool])
respond_with(@pool)
respond_with(@pool, :notice => "Pool updated")
end
def destroy
@pool = Pool.find(params[:id])
@pool.destroy
respond_with(@pool)
respond_with(@pool, :notice => "Pool deleted")
end
def revert
@pool = Pool.find(params[:id])
@version = PoolVersion.find(params[:version_id])
@pool.revert_to!(@version)
respond_with(@pool)
respond_with(@pool, :notice => "Pool reverted")
end
end