OSDN Git Service

temp
[pettanr/pettanr.git] / app / controllers / license_groups_controller.rb
index df576d8..3c90807 100644 (file)
@@ -1,25 +1,25 @@
 class LicenseGroupsController < ApplicationController
-  layout 'test' if Pettanr::Application.test_layout
+  layout 'test' if MagicNumber['test_layout']
   before_filter :authenticate_admin!, :only => [:list, :browse]
   
-  # GET /license_groups
-  # GET /license_groups.json
+  @@model = LicenseGroup
   def index
-    @license_groups = LicenseGroup.list()
+    set_filer
 
     respond_to do |format|
-      format.html # index.html.erb
-      format.json { render json: @license_groups.to_json(LicenseGroup.list_json_opt) }
+      format_filer format
+      format.json { render json: @items.to_json(@@model.list_json_opt) }
     end
   end
 
-  # GET /license_groups/1
-  # GET /license_groups/1.json
   def show
-    @license_group = LicenseGroup.show(params[:id])
+    @item = LicenseGroup.show(params[:id], @operators)
     respond_to do |format|
-      format.html # show.html.erb
-      format.json { render json: @license_group.to_json(LicenseGroup.show_json_opt) }
+      format.html {
+        @license_group = @item
+      }
+      format_prof format
+      format.json { render json: @item.to_json(LicenseGroup.show_json_opt) }
     end
   end