OSDN Git Service

Merge branch 'v06sheet' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06sheet
[pettanr/pettanr.git] / app / controllers / ground_pictures_controller.rb
index 26c14b7..9cf4159 100644 (file)
@@ -31,6 +31,7 @@ class GroundPicturesController < ApplicationController
   end
   
   def new
+    raise Pettanr::NotWork unless @author.working_panel
     @picture = Picture.show params[:picture_id], @author
     raise ActiveRecord::Forbidden unless @picture.enable?
     @panel = Panel.edit(@author.working_panel, @author)
@@ -54,6 +55,7 @@ class GroundPicturesController < ApplicationController
   end
 
   def create
+    raise Pettanr::NotWork unless @author.working_panel
     @panel = Panel.edit(@author.working_panel, @author)
     
     @ground_picture = GroundPicture.new