You could just use set_table_name in your model.
class Person < ActiveRecord::Base
set_table_name = "person"
end
On 8/1/06, damon <dohouk@gmx.net> wrote:>
> I am connecting to a legacy DB that has some names plural and some not.
> I have configured:
>
> ActiveRecord::Base.pluralize_table_names = false
>
> now when i make a table that has an s on the end, it truncates the s.
>
> example:
>
> Table name: foo_bars
>
> Rails command: ruby script/generate FooBars
>
> Response (localhost:3000/FooBars): uninitialized constant FooBar
>
>
> It works fine with non-pluralized names, underscore or not.
>
> Can i configure Pluralize_table_names at a more granular level? how?
> Any Ideas??
> thanx
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060801/5b8957dc/attachment.html