class LicenseGroupsController < ApplicationController
- before_filter :authenticate_admin!, :only => []
+ before_filter :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy]
def self.model
LicenseGroup
list_count
end
+ def new
+ form_new
+ end
+
+ def edit
+ form_edit
+ end
+
+ def create
+ set_model
+ @item = @my_model_class.new
+ @item.supply_default
+ @my_model_class.fold_extend_settings params[@my_model_class.item_name]
+ @item.attributes = params[@my_model_class.item_name]
+ @item.overwrite
+ render_create
+ end
+
+ def update
+ set_edit
+ @my_model_class.fold_extend_settings params[@my_model_class.item_name]
+ @item.attributes = params[@my_model_class.item_name]
+ @item.overwrite
+ render_update
+ end
+
end