[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

scaffold upper case table and underscores

joe

3/3/2008 4:07:00 PM

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.
1 Answer

Avdi Grimm

3/3/2008 9:47:00 PM

0

On Mon, Mar 3, 2008 at 11:10 AM, joe <jcharth@gmail.com> 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] http://api.rubyonrails.org/classes/ActiveRecord/Base.ht...
[2] http://groups.google.com/group/rubyon...

--
Avdi