with Rails 3.1 this worked for me:

   config.active_record.observers = [ :"Admin::BusinessObserver" ]

Came up from looking at how the active_record.observer list is parsed in
gems/1.8/gems/activemodel-3.1.0/lib/active_model/observing.rb line 86

Bruno



Ankit Varshney wrote in post #907087:
> I have a namespace as admin and in this i have class as Admin::Business.
> I want to add observer to it. I tried to add a class
> Admin::BusinessObserver
> and adding the observer in environment.rb like
>
> config.active_record.observers = [Admin::BusinessObserver]. but it does
> not
> work. Can anybody guide me to add observer to namespaced classes.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/e3076005534f178308bb39ee7460ad80%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to