OSDN Git Service

fix js
[pettanr/pettanr.git] / app / controllers / application_controller.rb
index f1da1ce..0d4ea69 100644 (file)
@@ -106,7 +106,7 @@ class ApplicationController < ActionController::Base
   def set_model
     @my_controller = Manifest.manifest.controllers[params[:controller].to_s]
     @my_action = @my_controller.actions[params[:action].to_s]
-    @my_model = Manifest.manifest.models[@my_controller.item_name]
+    @my_model = Manifest.manifest.models[@my_action.item_name]
     @my_model_class = @my_model.classify
   end
   
@@ -165,7 +165,7 @@ class ApplicationController < ActionController::Base
   def show_prof_format format
     format.prof {
       self.formats = [:html]
-      @profiler = Locmare::Profiler.new @my_model.model_name, @item, @operators
+      @profiler = Locmare::Profiler.new @my_model_class.item_name, @item, @operators
       render @profiler.template_name, :locals => {
         :profiler => @profiler
       }