OSDN Git Service

rename model name
[pettanr/pettanr.git] / app / controllers / scrolls_controller.rb
index 6e459b7..3c88b60 100644 (file)
@@ -10,10 +10,6 @@ class ScrollsController < ApplicationController
     before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
   end
   
-  def self.model
-    Scroll
-  end
-  
   def index
     filer_list
   end
@@ -28,10 +24,11 @@ class ScrollsController < ApplicationController
   
   def show_html_format format
     format.html {
-      play_list = Locmare::ListGroup.list 'scroll_panel', 'play'
-      @play_count = play_list.count(@operators, 
+      play_list = Locmare::ListGroup.list(
+        'scroll_panels', 'by_scroll', @operators, 
         {:id => @item.id, :my_play => @item.own?(@operators)}
       )
+      @play_count = play_list.count(@operators)
     }
   end
   
@@ -50,8 +47,8 @@ class ScrollsController < ApplicationController
     respond_to do |format|
       format.html {
         if @item.own? @operators
-          @fresh_panel_items = assist_items('panel', 'public')
-          @new_panel_items = assist_items('panel', 'private')
+          @fresh_panel_items = assist_items('panels', 'index')
+          @new_panel_items = assist_items('home', 'panels')
         end
       }
       format.json { render json: @items.to_json }