On Oct 24, 2010, at 5:24 PM, Wes Gamble wrote:

> Are Radiant custom extension controllers, models, etc. supposed to reload 
> between each request like regular Rails objects in development mode or not?

Rails sees Radiant extensions as plugins, not engines or native application 
entities. They won't get reloaded unless you take steps to make it happen. If 
you take a look at the PageFactory extension, I'm doing something along those 

Dir["#{path}/*_page_factory.rb"].each do |page_factory|
  if page_factory =~ %r{/([^/]+)\.rb}
    require_dependency page_factory
    ActiveSupport::Dependencies.explicitly_unloadable_constants << $1.camelize

I'm 1) registering my own classes with ActiveSupport's dependency mechanism, 
and 2) telling ActiveSupport that these need to get reloaded between requests.

Hope that helps,

Reply via email to