OSDN Git Service

Merge branch 'v06sheet' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06sheet
[pettanr/pettanr.git] / app / models / panel.rb
index 3bfcbf3..cc1dc82 100644 (file)
@@ -2,7 +2,7 @@
 class Panel < ActiveRecord::Base
   belongs_to :author
   belongs_to :resource_picture
-  has_many :stories
+  has_many :scroll_panels
   has_many :panel_pictures, :dependent => :destroy
   has_many :speech_balloons, :dependent => :destroy
   has_many :ground_pictures, :dependent => :destroy
@@ -71,6 +71,7 @@ class Panel < ActiveRecord::Base
       return false unless reader_role_check(roles)
     end
     return true if self.own?(roles)
+    return true if self.new_record?
     self.publish?
   end