On May 23, 5:14 am, Ed W <[email protected]> wrote:
> Ed W wrote:
> > Commenting out the whole "class Core" section stops the initialisation
> > errors altogether, so clearly the problem is that this code is masking
> > the whole AS ActiveScaffold::Config::Core definition?
>
> I just can't see the error here?  Is it possible that there is some kind
> of lazy class loading introduced in newer rails which is biting here?
> Could it be a plugin loading order issue?  It's not immediately obvious
> why loading order should matter here in any case, as long as all the
> modules ARE loaded eventually?
>
> (Note to self, check there isn't some conditional loading code in AS?)
>
> Thanks for any thoughts/tips?  I think this much be a general problem
> trying to write a plugin for AS under rails 2.3, so perhaps someone
> could have a look into this?

Just a few hours ago, I've succesfully modified active_scaffold_export
to work on Rails 2.2 and I'm pretty sure that my modifications will
fix your problem also.

You are having problems with Rails autoloader (introduced in Rails
2.2). Now, code like this (in ASexport):

class ActiveScaffold::Config::Core
 #overrides
end

Really declares de Core class, breaking AS, because the class is now
'lazily' loaded (and it's not declared when ASexport code is
evaluated). Now, you have to use something like

ActiveScaffold::Config::Core.class_eval do
 #overrides
end

So Rails' autoload will load the class before the overrides.

I've also rearranged some files in ASexport to use Rails autoloader.

I've never used GitHub, but this seems to be a good moment to start.
This weekend I'll fork active_scaffold_export so both of us can work
on a 2.2/2.3 enabled  active_scaffold_export.

> Ed W

Greetings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to