Skip to content
Snippets Groups Projects
Commit 4cef1045 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

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

parent 1b904eb1
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment