OSDN Git Service

temp
[pettanr/pettanr.git] / app / controllers / pictures_controller.rb
index 043bad7..959f171 100644 (file)
@@ -11,14 +11,16 @@ class PicturesController < ApplicationController
   before_filter :authenticate_admin!, :only => [:list, :browse]
   
   def show
-    @item = Picture.show(params[:id], [@user, @admin, @demand_user])
+    @item = Picture.show(params[:id], @operators)
 
     respond_to do |format|
       opt = {:type => @item.mime_type, :disposition=>"inline"}
       format.png { send_data(@item.restore(params[:subdir]), opt ) }
       format.gif { send_data(@item.restore(params[:subdir]), opt ) }
       format.jpeg { send_data(@item.restore(params[:subdir]), opt ) }
-      format.html 
+      format.html {
+        @picture = @item
+      }
       format_prof format
       format.json { render :json => @item.to_json}
     end