Loading...

engine-users@lists.rails-engines.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

[Engine-users] lib folders and application controllers Trey Bean Fri Feb 16 12:10:39 2007

What's the best way to handle items in your engine's lib folder?  I have a
couple of support files I would normally place in my lib folder and then
include in my application controller.  In developing my engine, I placed
these files in the lib folder within my engine.  Then, I did what I would
normally do and added the include code to the application controller in my
engine.  I quickly realized that this was being overwritten with the
surrounding application's application controller, and not wanting to require
those applications to delete their application controller, I just pasted the
code into the surrounding application controller (there might be a better
way to do this, but one of the lines is a before_filter).

Anyway, that works when I actually run the application, but now, when I run
my tests, I get an error saying:

`const_missing': uninitialized constant
ApplicationController::AuthenticatedSystem (NameError)

So, I guess my question is, what is the best practice regarding both files
in your engine's lib folder as well as including code in the surrounding
application's application controller?

Thanks,
Trey
_______________________________________________
engine-users mailing list
[EMAIL PROTECTED]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org