# Engines 1.2: Flexible Fixtures support be dropped - RFC

**URL:** <https://www.ruby-forum.com/t/engines-1-2-flexible-fixtures-support-be-dropped-rfc/79479>\
**Category:** Engines Development\
**Created:** [December 15, 2006, 4:05pm UTC](https://www.ruby-forum.com/t/engines-1-2-flexible-fixtures-support-be-dropped-rfc/79479 "2006-12-15T16:05:03Z")\
**Posts on this page:** 1\
**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:** [December 15, 2006, 4:05pm UTC](https://www.ruby-forum.com/t/engines-1-2-flexible-fixtures-support-be-dropped-rfc/79479/1 "2006-12-15T16:05:03Z")

</div>

Hello again all,

Development continues apace towards the 1.2 release of the engines  
plugin. As I mentioned previously, I’m taking this release as an  
opportunity to make things simpler internally. One of the most  
significant chunks of code in the current public release of engines is  
the fixture code, and I’m toying with dropping it in 1.2. Here’s the  
rational.

When I first put together the ‘login\_engine’, it occured to me that  
people might not want to always use the same table name for their user  
accounts - they might want “user”, or “account”, or “registration” or  
whatever else. In order to allow these “engines” to work (and be  
tested) with a user-specified table name, I had to be able to load a  
fixture file with a fixed name into an arbitrarily-named table.  
Because Rails’ fixtures method derives the appropriate table (and  
class) from the fixtures file name, it wasn’t flexible enough to  
support this.

Duane J.'s great patch ([http://dev.rubyonrails.org/ticket/1911](http://dev.rubyonrails.org/ticket/1911))  
solved exactly this problem, so with his permission I used essentially  
that exact code to support this ‘flexible fixtures’ requirement of the  
login\_engine as it stood. However, it’s by far the most complex piece  
of code in the engines plugin, and it’s increasingly difficult to  
maintain as Rails changes and evolves. The functionality his patch  
provides should be in core, but we’ll see if that ever actually  
happens.

My own personal opinion about allowing developers to use the  
login\_engine (or other plugins) with any table name has also evolved.  
To support this generality, the complexity of the code hugely  
increases (both in the engines plugin to support it, and in the  
engine/plugin to allow arbitrary tables to be used), basically to the  
point where I don’t think it’s worth it anymore. I’m also moving away  
from using fixtures anyway, towards creating the test data in code  
instead - but that’s just me.

It’s important to note that I’m not talking about dropping support for  
fixtures in plugins; rather I’m talking about not including the patch  
which allows fixtures to be loaded into arbitrary tables in the  
engines plugin anymore.

So - thoughts? Does anyone really need this functionality?
