OSDN Git Service

list browser created
[pettanr/pettanr.git] / app / models / comic.rb
index b4b502d..ab882cf 100644 (file)
@@ -1,9 +1,14 @@
 class Comic < ActiveRecord::Base
   has_many :panels, :dependent => :destroy
+  belongs_to :author
 
   def own? author
     return false unless author
     self.author_id == author.id
   end
   
+  def disp_editable
+    editable == 1 ? 'O' : 'X'
+  end
+  
 end