OSDN Git Service

fix: finder
[pettanr/pettanr.git] / app / assets / javascripts / controllers.js.coffee
index f9c9fb5..4dd2ab2 100644 (file)
@@ -18,11 +18,7 @@ class Pettanr.AppController
     \r
   set_list: () ->\r
     @set_model()\r
-    @my_list_model = Manifest.manifest().models[@my_action.item_name]\r
-    @my_list_model_class = @my_list_model.classify()\r
-    @list = Locmare.ListGroup.list(\r
-      @my_action.path_name(), @my_action.name, @params\r
-    )\r
+    @list = @my_action.find(@params)\r
   \r
   set_show: (render_func) ->\r
     @set_model()\r
@@ -40,11 +36,7 @@ class Pettanr.AppController
   \r
   set_play: (render_func) ->\r
     @set_list()\r
-    @binder_action = @my_action.original\r
-    @binder_controller = @binder_action.controller()\r
-    @binder_model = Manifest.manifest().models[@binder_action.item_name]\r
-    @binder_model_class = @binder_model.classify()\r
-    @binder_model_class.retrieve(@params['id'], this, {success: render_func})\r
+    @my_model_class.retrieve(@params['id'], this, {success: render_func})\r
   \r
   show_prof: () ->\r
     @item.boosts 'post'\r