[LRUG] Setting default roles in a user record

Tim Cowlishaw tim at timcowlishaw.co.uk
Tue Aug 7 08:02:57 PDT 2007


Hmm... thinking about it, wouldn't after_create do the job? i'm assuming
that after_initialize  is called whenever a new object of that class is
instantiated, whether through a new(), find() or whatever method on the
model. after_create is called after a new object of that class is created
through new().

http://groups.google.com/group/rubyonrails-core/browse_thread/thread/b509a2fe2b62ac5
http://api.rubyonrails.com/classes/ActiveRecord/Callbacks.html

Cheers,

Tim

On 8/7/07, Daniel Lucraft <dan at fluentradical.com> wrote:
>
>
> --- John Winters <john at sinodun.org.uk> wrote:
> > Actually, not so brilliantissimum.  I thought it
> > worked when I first
>
> Crapsicle. Thought I had it there.
>
> ps. Making up words is fun.
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20070807/4a5a3dd1/attachment-0003.html>


More information about the Chat mailing list