# Engines 2.3 compatibility

**URL:** <https://www.ruby-forum.com/t/engines-2-3-compatibility/165964>\
**Category:** Engines\
**Created:** [April 20, 2009, 12:13pm UTC](https://www.ruby-forum.com/t/engines-2-3-compatibility/165964 "2009-04-20T12:13:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [April 20, 2009, 12:13pm UTC](https://www.ruby-forum.com/t/engines-2-3-compatibility/165964/1 "2009-04-20T12:13:31Z")

</div>

Hi all,

I’ve just made the appropriate changes to bring the engines plugin  
into compatibility with Rails 2.3, and the engine features it  
implements. You can find these changes in the ‘edge’ branch of the git  
repository, which I’m currently working on now.

The most notable change within your engine plugins is that I’ve  
removed the custom routes handling from the engines plugin, in favour  
of the implementation supplied by Rails itself. This means that your  
routes should now be in config/routes.rb, rather than the plugin root,  
and that map.from\_plugin is no longer implemented.

The main reason for removing this is that I’m not very comfortable  
patching Rails to change existing behaviour like this; it was simpler  
when Rails didn’t provide any plugin routing, but I’m keen not to  
result in two kinds of engine plugins - ones that require the engines  
plugin itself, and others that work with Rails out-of-the-box.

If the community feels that controlling the positioning of the routes  
is necessary, we should be pursuing this as part of the Rails core  
implementation, i.e. with tickets and patches and +1s.

I’ve also properly removed support for ‘code\_paths’ in the plugin -  
there are simpler and more obvious ways to support this.

I am keen to smoothly transition as much of the key functionality as  
possible from the engines plugin into Rails itself. What remains,  
IMHO, is the following:

- a Rails.plugins map of loaded plugins
- Migrations support
- Public asset support

The major feature missing here is the ‘code-mixing’, which is  
basically a short cut for requiring a controller/helper from the  
plugin before reopening the class again in the application.

There’s already been some discussion on the Rails lighthouse instance  
about migrations, but without any suitable resolution. I’d be grateful  
to hear any ideas or thoughts you might have, either specifically  
about these features, or about this process in general.

Thanks again for your support,

James

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [May 15, 2009, 8:19pm UTC](https://www.ruby-forum.com/t/engines-2-3-compatibility/165964/2 "2009-05-15T20:19:16Z")

</div>

> The main reason for removing this is that I’m not very comfortable  
> patching Rails to change existing behaviour like this; it was simpler  
> when Rails didn’t provide any plugin routing, but I’m keen not to  
> result in two kinds of engine plugins - ones that require the engines  
> plugin itself, and others that work with Rails out-of-the-box.

Maybe having a  
config.do\_not\_autoload\_maps  
and then [re] enabling  
map.from\_plugin

would be good for the map side, at least.  
Then again, maybe nobody really needs ordered maps, so it might not be  
all that necessary.  
Just thinking out loud.  
-=r
