OSDN Git Service

temp
[pettanr/pettanr.git] / app / controllers / ground_colors_controller.rb
index 1071639..53bc819 100644 (file)
@@ -9,25 +9,18 @@ class GroundColorsController < ApplicationController
     before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy]
   end
 
+  @@model = GroundColor
   def index
-    @page = GroundColor.page params[:page]
-    @page_size = GroundColor.page_size params[:page_size]
-    @ground_colors = GroundColor.list(@page, @page_size)
+    set_filer
 
     respond_to do |format|
-      format.html {
-        @paginate = GroundColor.list_paginate(@page, @page_size)
-        render :template => 'system/filer', :locals => {
-          :items => @ground_colors, :model => GroundColor, 
-          :roles => [@user, @admin], :pager => @paginate
-        }
-      }
-      format.json { render :json => @ground_colors.to_json(GroundColor.list_json_opt) }
+      format_filer format
+      format.json { render json: @items.to_json(@@model.list_json_opt) }
     end
   end
   
   def show
-    @item = GroundColor.show(params[:id], [@user, @admin])
+    @item = GroundColor.show(params[:id], @operators)
     respond_to do |format|
       format.html {
         @ground_color = @item