2014-02-09 07:54:03 +00:00
|
|
|
class ResourcesController < ApplicationController
|
|
|
|
load_and_authorize_resource
|
|
|
|
before_filter :authenticate_user!
|
2014-02-09 09:08:08 +00:00
|
|
|
|
|
|
|
def destroy
|
|
|
|
@resource.destroy
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html { redirect_to(request.env["HTTP_REFERER"]) }
|
|
|
|
format.json { head :ok }
|
|
|
|
end
|
|
|
|
end
|
2014-02-09 07:54:03 +00:00
|
|
|
end
|