# Table called delegates

**URL:** <https://www.ruby-forum.com/t/table-called-delegates/141314>\
**Category:** Rails\
**Created:** [June 24, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/table-called-delegates/141314 "2008-06-24T17:11:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@ChrisS](https://www.ruby-forum.com/u/ChrisS)\
**Post date:** [June 24, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/table-called-delegates/141314/1 "2008-06-24T17:11:35Z")

</div>

Hi

I am working on moving my RoR applications to a new server running  
2.0.2 (currently on 1.2.3). My databases (for a conference booking  
system) have a table called delegates which appears to be causing a  
problem and I note there is a method called delegate in Rails.

Unfortunately I have about 27 databases with these schema or something  
similar.

I have had similar problems in the past where databases have tables  
called applications and types.

Is there a way round this other than sticking with 1.2.3 or renaming  
all my delegates tables xdelegates with all the consequental changes  
this entails (these databases are not just used by RoR applications).

Is it possibel to remove the ‘delegate’ method from Rails?

Surely the methods used by Rails as against the methods generated from  
the schema should be in some sort of separate namespace so this sort  
of thing cannot happen?

Chris

---

<div class="post-metadata">

**Author:** ![ChrisS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@ChrisS](https://www.ruby-forum.com/u/ChrisS)\
**Post date:** [June 24, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/table-called-delegates/141314/2 "2008-06-24T18:48:25Z")

</div>

On 24 Jun 2008, at 16:10, ChrisS wrote:

> I have had similar problems in the past where databases have tables  
> called applications and types.
> 
> Is there a way round this other than sticking with 1.2.3 or renaming  
> all my delegates tables xdelegates with all the consequental changes  
> this entails (these databases are not just used by RoR applications).

You could just call your class/associations something other than  
delegate, while leaving the table name the same

> Is it possibel to remove the ‘delegate’ method from Rails?

rails uses it so probably not

> Surely the methods used by Rails as against the methods generated from  
> the schema should be in some sort of separate namespace so this sort  
> of thing cannot happen?

unfortunately not.

Fred
