Skip to content

Instantly share code, notes, and snippets.

@eduardordm
Created November 17, 2010 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save eduardordm/702837 to your computer and use it in GitHub Desktop.
Save eduardordm/702837 to your computer and use it in GitHub Desktop.
# Trace is a model in vendor/plugins/mylogger/lib/app/models/trace.rb
# vendor/plugins/mylogger/lib/mylogger.rb
#...
module MyLoggerImpl
def self.trace(controller_instance)
puts 'Tracing'
controller_instance.instance_eval do
t = Trace.new
t.path = request.url
t.save
end
end
# ...
end
# Error is: uninitialized constant MyLogger::MyLoggerImpl::Trace
# Trace is obviously not in that module. But, how can I use it in my plugin?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment