search for: svc_destroy_all

Displaying 1 result from an estimated 1 matches for "svc_destroy_all".

2010 Sep 03
1
[PATCH] Adding some control over usages in the network creation/edition form
...b/src/app/controllers/usages_controller.rb @@ -0,0 +1,13 @@ +class UsagesController < ApplicationController + include UsageService + + def create + usage = svc_create(params[:usage]) + render :json => { :success => true, :data => usage } + end + + def remove + removed_ids = svc_destroy_all(params[:ids]) + render :json => { :success => true, :removed => removed_ids } + end +end diff --git a/src/app/models/usage.rb b/src/app/models/usage.rb index 59b0e48..883a888 100644 --- a/src/app/models/usage.rb +++ b/src/app/models/usage.rb @@ -22,6 +22,6 @@ class Usage < ActiveRec...