# Scaffold upper case table and underscores

**URL:** <https://www.ruby-forum.com/t/scaffold-upper-case-table-and-underscores/130818>\
**Category:** Ruby\
**Created:** [March 3, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/scaffold-upper-case-table-and-underscores/130818 "2008-03-03T17:11:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [March 3, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/scaffold-upper-case-table-and-underscores/130818/1 "2008-03-03T17:11:36Z")

</div>

Hello I am learning how to use ruby on rails. I was able to generate  
model and controller for lower case tables just doing

./script/generate model Post  
./script/generate controller Post

and then adding

scaffold :post

to the .rb controller file. I was unable to just change scaffold :post  
to scaffold: MY\_CONTACTS. My table is upper case with underscores does  
this make a difference. I am also using the sybase adapter. Thanks.

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [March 3, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/scaffold-upper-case-table-and-underscores/130818/2 "2008-03-03T22:48:55Z")

</div>

On Mon, Mar 3, 2008 at 11:10 AM, joe [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello I am learning how to use ruby on rails. I was able to generate  
> model and controller for lower case tables just doing

You should look into the set\_table\_name[1] command if you have to deal  
with legacy tables. If you don’t have to deal with legacy tables, you  
should follow the Rails conventions for table names and you’ll be a  
lot happier.

And then you should wander over to the Rails [2] mailing list, because  
this is the _Ruby_, not Rails, community.

[1] [ActiveRecord::Base](http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001399)  
[2] [http://groups.google.com/group/rubyonrails-talk](http://groups.google.com/group/rubyonrails-talk)
