The Ruby on Rails convention for database table and field names is snake_case and not CamelCase. However, I have an existing database being used by a PHP application. I woul
The short answer is yes but it's not always easier than migrating the old database to a new database. If you want both applications to be able to use the same database though then it is probably the quickest approach up front.
You can override the table and foreign key fields by doing the following:
set_table_name "camelCaseName"
set_primary_key "cameCaseIdName"
You can alias all the field names if necessary as well:
alias "camelCaseFieldName", "field_name"
All of the AR relationships can set the primary key field as well.
has_many :comments, :foreign_key_id => "commentCamelCaseID"
It's more work than normal but it is possible.