Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Make plugins also initialize form rails/init.rb

#272

There is an ongoing trend to package Rails plugins as gems. Features recently added to Rails (config.gem, rake gems:*) make this only easier.

Before we forget about plugins (if we ever) there will be some period of coexistence of both systems.

With this patch you can have one codebase which can be used both as a gem and a plugin.

The patch makes plugins use rails/init.rb if exists just like in gems (and init.rb if it doesn't). Now one would have to keep both init.rb and rails/init.rb in your repository.

In other words I wanted to be able to choose between those two:

./script/plugin install git://github.com/user/plugin.git

sudo gem install user-plugin --source=http://gems.github.com

and have a clean codebase without two init.rb files (one in main directory and one in rails/init.rb).

Attachment contains patch with tests.

Reported by Jacek Becela · May 28th, 2008 @ 09:09 PM

State: resolved
Milestone: none
Assigned to: Rick Rick
Importance: none

Activity

  1. netshade
  2. Pratik
    Pratik
    • Assigned user set to Rick

    June 5th, 2008 @ 10:35 PM

  3. Repository
    Repository
    • State changed from new to resolved

    (from [86a042ddd9dba8f62e7328c7258a798aef73d57f]) Make plugins initialize also from rails/init.rb to ensure consistency with gems used as plugins

    [#272 state:resolved]

    http://github.com/rails/rails/co...

    June 8th, 2008 @ 06:07 PM