OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / models / writing_format.rb
index afa4198..4cdfd73 100644 (file)
@@ -36,6 +36,12 @@ class WritingFormat < ActiveRecord::Base
     WritingFormat.find(:all, opt)
   end
   
+  def self.enable_list
+    WritingFormat.list.delete_if {|wf|
+      wf.enable? == false
+    }
+  end
+  
   def self.list_opt
     {}
   end
@@ -77,6 +83,10 @@ class WritingFormat < ActiveRecord::Base
     Pettanr::Application.writing_formats[self.classname]
   end
   
+  def enable?
+    Pettanr::Application.writing_formats.include? self.classname
+  end
+  
   def engine_module_name
     self.engine_name.camelize
   end