Fixed wrong trimming for "model" from filename to receive tablename #0

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@117 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
aterekhov
2010-02-28 21:34:08 +00:00
parent c71458bee4
commit a8322c3831

View File

@ -128,8 +128,8 @@ abstract class Model
public function table()
{
if (! $this->table) {
$this->table = rtrim(strtolower(get_class($this)), 'model');
$this->table = substr(strtolower(get_class($this)), 0, -5/*strlen('Model')*/);
}
return $this->table;
}
}
}