Observers doesnt get registred in productize


#1

Hi!

My observers doesn’t get registred by active record.
I’m doing a refactoring of a site into products by the framework
productize (i love the concept).
Currently all my observers are located in “lib” and loaded (i have tried
require and require_dependency) during initialising of the rails-app
(from bottom of environment.rb).
The observers are loaded with the MyObserver.instance after the
declaration of its class. This works in the old app.

I have tried and using the method
config.active_record.observers=:my_observer during
Rails::Initializer.run but this doesn’t helps either.

We are using some other peoples code for making productize adoption to
rails 0.14, so its possible that he or she has maked any tweakings that
interfers with default behavior for ActiveRecord::Observer. I have
looked in productize.rb, boot.rb, development.rb and everything seems to
be ok.
I’m doing any fundamental error here? Any help appreciated!

/kristian


#2

On 14-nov-2005, at 12:37, Kristian H. wrote:

We are using some other peoples code for making productize adoption to
rails 0.14

If you have canadaduane’s Productize working with current Rails I
think there’s lots of people that would like to know about it, me
being one of them ;).


Regards, Charles.


#3

Well, that is how you define “working”. Generators, scripts and so on
doesn’t work out of the box (did that work with 0.13?). But the
site-product seems to be up and running with the base nicely.

The problem is that I dont know who the author of this package is and
which and how much changes that are done :confused:
But I can’t let down a rails-friend :slight_smile: so I uploaded the file to my blog
http://kristian.delamednoll.se

Maybe the author of this package (productize.tgz) reads this? Please let
us know :slight_smile:

Hope I dont step on anybodys foot or creates any expectations here :confused:


#4

This problem seems to be resolved when I run the application in
production mode. Should I set some variable in production.rb?

/kristian


#5

tis 2005-11-15 klockan 17:18 +0100 skrev Kristian H.:

This problem seems to be resolved when I run the application in
production mode. Should I set some variable in production.rb?

I mean development.rb :stuck_out_tongue: