class LicenseGroupsController < ApplicationController
- before_filter :authenticate_admin!, :only => []
+ before_filter :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy]
def self.model
LicenseGroup
filer_list
end
+ def show_html_format format
+ format.html {
+ @license_group = @item
+ }
+ end
+
def show
- @item = LicenseGroup.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- @license_group = @item
- }
- format_prof format
- format.json { render json: @item.to_json(LicenseGroup.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
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