Ruby on Rails
Saturday, July 2, 2011
Hey,
I have a gem called 'authorizer' which does authorization for me. It has two observer classes that need to be added to the list of ActiveRecord observers:
config/environment.rb:
require "authorizer/user_observer"
require "authorizer/object_observer"
config.active_record.observers = "Authorizer::UserObserver", "Authorizer::ObjectObserver"
This gives me the error:
`load_missing_constant': uninitialized constant Authorizer::ActiveRecord (NameError)
This problem is solved by copying the gem's source files into the lib/ folder or by using a plugin. But I don't want that. How can I ensure the gem is loaded AFTER the Rails framework is loaded?
This is on Rails 2.3.11
All the best,
CmdJohnson
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment