The approach I've used was to name a library after your engine (e.g. module
FooEngine in foo_engine.rb in the plugin's lib directory) then include it
into your application.rb

--
Tony Arcieri
ClickCaster, Inc.


On 6/26/07, James Adam <[EMAIL PROTECTED]> wrote:

It seems wrong to me that you'd even want a file called
"application.rb" in a plugin. If you want methods to be available to
all controllers, you can achieve this by adding the methods to
ActionController::Base via module inclusion.

Having routable controllers in plugins doesn't mean that *everything*
under your_plugin/app should get mixed - code mixing is the special
case, and shouldn't be relied upon too much.

On 6/24/07, Patrick Gundlach <[EMAIL PROTECTED]> wrote:
> Repost, because I wasn't subscribed to the mailing list:
>
> > I have an authentification application with methods such as
"logged_in?"
> > in controllers/application.rb. But when I moved the application.rbfrom
> > a real app to an engine, these methods are not known anymore. I call
the
> > method from a controller within the engine. Did I miss anything?
> >
> > Side note: the login_controller in the engine is called, so the engine
> > is active in a way.
> >
> > Patrick
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> engine-users mailing list
> [email protected]
>
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
>


--
* J *
  ~
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to