# Change Ruby on Rails' reserved words?

**URL:** <https://www.ruby-forum.com/t/change-ruby-on-rails-reserved-words/113911>\
**Category:** Rails\
**Created:** [September 6, 2007, 3:32am UTC](https://www.ruby-forum.com/t/change-ruby-on-rails-reserved-words/113911 "2007-09-06T03:32:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nfessel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a4c791/32.png) [@nfessel](https://www.ruby-forum.com/u/nfessel)\
**Post date:** [September 6, 2007, 3:32am UTC](https://www.ruby-forum.com/t/change-ruby-on-rails-reserved-words/113911/1 "2007-09-06T03:32:35Z")

</div>

Hi,

One of my database tables has to have the same name as a reserved word  
in Ruby on Rails. Is there a way to change the name of a Ruby on Rails  
reserved word by overloading it or by some other means? I really do  
not want to change my table name. Thank you.

-Nick J. Fessel  
[http://www.nickfessel.com](http://www.nickfessel.com)

---

<div class="post-metadata">

**Author:** ![nfessel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a4c791/32.png) [@nfessel](https://www.ruby-forum.com/u/nfessel)\
**Post date:** [September 6, 2007, 6:03am UTC](https://www.ruby-forum.com/t/change-ruby-on-rails-reserved-words/113911/2 "2007-09-06T06:03:51Z")

</div>

nfessel wrote:

> Hi,
> 
> One of my database tables has to have the same name as a reserved word  
> in Ruby on Rails. Is there a way to change the name of a Ruby on Rails  
> reserved word by overloading it or by some other means? I really do  
> not want to change my table name. Thank you.
> 
> -Nick J. Fessel  
> [http://www.nickfessel.com](http://www.nickfessel.com)

Why not just change the name of your model? E.g.:

class NotReservedWord \< ActiveRecord::Base  
set\_table\_name “reserved\_word”  
end

–  
Michael W.

---

<div class="post-metadata">

**Author:** ![nfessel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a4c791/32.png) [@nfessel](https://www.ruby-forum.com/u/nfessel)\
**Post date:** [September 6, 2007, 11:58pm UTC](https://www.ruby-forum.com/t/change-ruby-on-rails-reserved-words/113911/3 "2007-09-06T23:58:28Z")

</div>

Excellent. I didn’t know about set\_table\_name. Thank you Michael.
