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
def set_play
set_list
- @item = @my_model_class.show(params[:id], @operators)
+ @binder_controller = Manifest.manifest.controllers[params[:controller].to_s]
+ @binder_model = Manifest.manifest.models[@binder_controller.item_name]
+ @binder_model_class = @binder_model.classify
+ @item = @binder_model_class.show(params[:id], @operators)
end
def play_list
def show_prof_format format
format.prof {
self.formats = [:html]
- @profiler = Locmare::Profiler.new @my_model.item_name, @item, @operators
+ @profiler = Locmare::Profiler.new @my_model_class.item_name, @item, @operators
render @profiler.template_name, :locals => {
:profiler => @profiler
}
end
def show_json_format_for_root format
- format.json { render json: @item.attributes.to_json(@my_model_class.show_json_opt_for_root) }
+ format.json { render json: @item.to_json(@my_model_class.show_json_opt_for_root) }
end
def set_new