On Wed, Sep 1, 2010 at 11:35 PM, Wes Gamble <we...@att.net> wrote:
> When I use a block like:
>   extension_config do |config|
>     config.after_initialize do
>       ...custom stuff...
>     end
>   end
> to manipulate the Rails configuration in an xxx_extension.rb file, is the
> config.after_initialize block important?  If so, why?
> Thanks,
> Wes

It depends on when you want things to happen. after_initialize fires
after the application has been initialized, or in other words, after
all relevant code has been loaded. If you want to alter some class,
for example, but don't know when it will be loaded you could do it in
an after_initialize block.

But it's easy to try out your changes within or without that block and
see what happens.

Jim Gay
Saturn Flyer LLC

Reply via email to