[Rails] PostgreSQL Schema and Rails
Dave Steinberg
dave-dated-1110252693.909b5c at redterror.net
Tue Mar 1 03:31:30 GMT 2005
>>>How about:
>>>
>>>class Form < ActiveRecord::Base
>>> table_name "Manage.Form"
>>>end
>>>?
>>
>>Yes, I knew of that, just wondering if there was a way to define the
>>table_name with the generate script..and if not, will there be a way?
>>(feature request?)
You can also use the table name prefix hooks that AR provides - but that
will assume most of your tables are in a single schema (which is often
the case). Then use the table_name stuff for exceptions.
I believe you want to set the class variable "table_name_prefix" in
ActiveRecord::Base to use this approach. Have a look through the docs.
Regards,
--
Dave Steinberg
http://www.geekisp.com/
http://www.steinbergcomputing.com/
More information about the Rails
mailing list