Forum: Ruby on Rails Observers doesnt get registred in productize

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
kristian.lists (Guest)
on 2005-11-14 13:37
(Received via mailing list)
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
charles (Guest)
on 2005-11-14 14:22
(Received via mailing list)
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.
kristian.lists (Guest)
on 2005-11-14 16:13
(Received via mailing list)
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 :/
But I can't let down a rails-friend :) 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 :)

Hope I dont step on anybodys foot or creates any expectations here :/
kristian.lists (Guest)
on 2005-11-15 18:21
(Received via mailing list)
This problem seems to be resolved when I run the application in
production mode. Should I set some variable in production.rb?

/kristian
kristian.lists (Guest)
on 2005-11-15 21:55
(Received via mailing list)
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 :p
This topic is locked and can not be replied to.