OSDN Git Service

t#32326:fix work
[pettanr/pettanr.git] / app / controllers / ground_colors_controller.rb
index 139699c..e9456f9 100644 (file)
@@ -31,6 +31,7 @@ class GroundColorsController < ApplicationController
   end
   
   def new
+    raise Pettanr::NotWork unless @author.working_panel
     @panel = Panel.edit(@author.working_panel, @author)
     @ground_color = GroundColor.new :panel_id => @panel.id, :code => params[:code].to_i
     @ground_color.supply_default
@@ -51,6 +52,7 @@ class GroundColorsController < ApplicationController
   end
 
   def create
+    raise Pettanr::NotWork unless @author.working_panel
     @panel = Panel.edit(@author.working_panel, @author)
     
     @ground_color = GroundColor.new