OSDN Git Service

fix play
[pettanr/pettanr.git] / app / controllers / artists_controller.rb
index 3f980c1..f840f78 100644 (file)
@@ -13,51 +13,36 @@ class ArtistsController < ApplicationController
   end
   
   def index
-    public_list
+    filer_list
   end
-
-  def resource_pictures
-    has_many_list
+  
+  def show_html_format format
+    format.html {
+      @artist = @item
+    }
   end
   
   def show
-    @item = Artist.show(params[:id], @operators)
-
+    set_show
     respond_to do |format|
-      format.html {
-        @artist = @item
-      }
-      format_prof format
-      format.json { render :json => @item.to_json(Artist.show_json_opt) }
+      show_html_format format
+      show_prof_format format
+      show_json_format format
     end
   end
-
+  
   def count
-    @artist = {:count => Artist.visible_count}
-    respond_to do |format|
-      format.json { render json: @artist.to_json }
-    end
+    list_count
   end
   
   def new
-    @artist = Artist.new
-    @artist.supply_default 
-
-    respond_to do |format|
-      format.html
-      format.js
-      format.json { render json: @artist.to_json(Artist.show_json_opt) }
-    end
+    form_new
   end
-
+  
   def edit
-    @artist = Artist.edit(params[:id], @operators)
-    respond_to do |format|
-      format.html 
-      format.js
-    end
+    form_edit
   end
-
+  
   def create
     @artist = Artist.new()
     @artist.supply_default