Rails.plugins


#1

One of the handy things missing from Rails, that the engines plugin
tries to provide but which isn’t really core to its functionality, is
a way of inspecting the set of loaded plugins while the application is
running.

This is achieved via the Engines.plugins method (which is again
aliased as Rails.plugins, for backwards compatibility). We use this
mostly when dealing with public assets from within plugins, but it’s
also useful for generating RDoc for plugins.

In fact, the only thing the custom engines plugin loader does is to
add plugins to this set, so if Rails itself implemented it, we could
simplify the plugin greatly. Maybe even get rid of the ‘boot’ line,
which needs to be added to the top of environment.rb!

Here’s my ticket, hidden under the guise of being about the plugin
documentation task:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2526-generated-plugin-rdoc-should-include-all-code-within-plugin-load_paths

Feedback appreciated,

James


#2

I think it is a good idea.

It makes sense to simplify things.

boot.rb is a bit of a pain, so integrating it directly into Rails
would be great.

Kind regards,
Samuel


#3

On 21 Apr 2009, at 10:59, Space Ship T. wrote:

I think it is a good idea.

It makes sense to simplify things.

boot.rb is a bit of a pain, so integrating it directly into Rails
would be great.

Kind regards,
Samuel

So I should’ve said - if you think it’s a good idea, please comment on
the ticket itself :slight_smile:

Thanks,

James