OSDN Git Service

Merge branch 'v06sheet' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06sheet
[pettanr/pettanr.git] / app / controllers / panel_pictures_controller.rb
index f093949..5a98947 100644 (file)
@@ -51,6 +51,7 @@ class PanelPicturesController < 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)
@@ -74,6 +75,7 @@ class PanelPicturesController < ApplicationController
   end
 
   def create
+    raise Pettanr::NotWork unless @author.working_panel
     @panel = Panel.edit(@author.working_panel, @author)
     
     @panel_picture = PanelPicture.new