Евгений Суворов Thu Feb 27 07:16:14 -0500 2014

Subject: Doesn't work ActiveRecord


I have a problem.

It's my code:
class Books extends ActiveRecord\Model {
function _construct(){

And call:

If class Books has magic method "__construct" method "Books::first()" returns empty result.
How can I do correctly work ActewRecord with method "__construct" in my class?

Adam K Tue May 13 23:40:30 -0400 2014

Is there any particular reason you need __construct() ? It might be worth looking at the callbacks and using the before_create callback.