Forum: Ruby on Rails How to know that a plugin is loaded

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fernando B. (Guest)
on 2006-05-31 17:25
(Received via mailing list)

We are developing an application in which the plugin acts_as_taggable
can be loaded or not. So we need to know if the plugin is loaded in
order to call the acts_as_taggable function en the model definition.

We have found a not so elegant solution:

class Post < ActiveRecord::Base

  acts_as_taggable  if defined? Tag

That is, check if the class Tag (a class that creates the plugin) is

Do you know a more elegant alternative?

By the way, this works perfectlly with Lighttpd + FastCGIs, but in our
development envirnonment, using Apache2 + FastCGIs it only works in
the first requirement to the dispatch. Any idea?

This topic is locked and can not be replied to.