فهرست منبع

Filenames are now based on classnames so that the PHP ActiveRecord autoloader will find them.

Taddeus Kroes 13 سال پیش
والد
کامیت
4cef104557
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      generate.py

+ 1 - 1
generate.py

@@ -193,7 +193,7 @@ class Model(object):
         return php_block(php) if add_php_block else php
 
     def filename(self):
-        return self.singular_name() + '.php'
+        return self.classname().lower().replace('_', '') + '.php'
 
     def create_path_from_dir(self, dirname):
         return os.path.dirname(dirname + '//') + '/' + self.filename()