scaffold upper case table and underscores

J

joe

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.
 
A

Avdi Grimm

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] http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001399
[2] http://groups.google.com/group/rubyonrails-talk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top