How to know that a plugin is loaded

Hi!

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

end

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

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?

Thanks!