OSDN Git Service

t#28985:add credit
[pettanr/pettanr.git] / app / controllers / resource_pictures_controller.rb
index 55184fd..b630cdd 100644 (file)
@@ -1,6 +1,6 @@
 class ResourcePicturesController < ApplicationController
   layout 'test' if Pettanr::TestLayout
-  before_filter :authenticate_user!, :only => [:index, :show, :new, :create, :update]
+  before_filter :authenticate_user!, :only => [:index, :show, :credit, :new, :create, :update]
   before_filter :authenticate_admin!, :only => [:list, :browse]
 
   # GET /resource_pictures
@@ -35,7 +35,7 @@ class ResourcePicturesController < ApplicationController
     @resource_picture = ResourcePicture.show(params[:id])
 
     respond_to do |format|
-      format.html # show.html.erb
+      format.html { render :layout => false } # show.html.erb
       format.json { render :json => @resource_picture.to_json(ResourcePicture.list_json_opt)}
     end
   end