There is *preliminary* support (see
ActiveRecord::Base#wrapped_table_name) for prefixes in the latest
(1.1) release of the Engines plugin, although I'm not sure how they'll
interact with the fixtures method. One thing to bear in mind is that
the testing extensions provided with Engines let you specify the class
and table names for your fixtures (see the login/user engines for an
example of one way to achieve this, although I don't believe that what
I've done there is perfect).

However, as I said at the start, support is basic at the moment - the
relevant ticket is http://dev.rails-engines.org/tickets/67, if you can
contribute in any way, please re-open it and add your debug
info/patches there.

It's a bit of a tangled web with prefixes, migrations and fixtures all
influencing the right table name and affecting the class inference
mechanisms.

My best advice is to go ahead and change the engines code until you
have something you feel works, and then submit the diff as a patch,
where it will be double-checked and tested :)

- james

On 4/6/06, Nuno <[EMAIL PROTECTED]> wrote:
> Hello, I would like to have all the tables referenced by my engine
> prefixed with "something"
>
> I can't use the set_table_name function because unfortunately this break
> fixtures usage (fixtures are not found if fixture name != model name !=
> table name)
>
> I've tried to have a look inside engines code but I'm not (yet ;-)) able
> to touch something without the risk of injecting bugs.
>
> is there a patch somewhere ?
>
> Thanks
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> engine-users mailing list
> [email protected]
> http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
>


--
* J *
  ~
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to