Forum: Ruby on Rails override initialize on ActiveRecord?

Posted by Dan Brooking (Guest)
on 2012-12-21 17:03
(Received via mailing list)
Quick question... your answer will determine whether I have follow up
questions or not.

Is it ok to override initialize on an ActiveRecord model?  I've read 
some
thing that say it's ok, some that say it's not... just wanted to get a
general consensus.

Thanks
Dan
Posted by "Crispin Schäffler" <crispinschaeffler@gmail.com> (Guest)
on 2012-12-21 23:21
(Received via mailing list)
You are fine as long as you know what you do.

Am Freitag, 21. Dezember 2012 17:01:51 UTC+1 schrieb Dan Brooking:
Posted by Dan Brooking (Guest)
on 2012-12-21 23:39
(Received via mailing list)
lol, so basically that means for me, the answer is no :)


On Fri, Dec 21, 2012 at 2:05 PM, Crispin Schffler <
Posted by Dheeraj Kumar (Guest)
on 2012-12-22 02:13
(Received via mailing list)
Can't you use an after_initialize callback?

--
Dheeraj Kumar
Posted by Dan Brooking (Guest)
on 2012-12-22 02:57
(Received via mailing list)
That's what I ended up doing.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.