Prashant Tiwari wrote:> Hi,
> In My database there is a table called "categories". Now what
name
> should I specify for my model as per ruby naming convention? Is it
> "Category"???
> Also is it possible to keep database table name singular instead of
> plural?
> Please tell me.
> Thanx in advance.
> Prash
The model would be called Category.
Then in the model you can set the name using:
set_table_name "category"
Or if you want this for all models, put the following line in your
environmen.rb:
ActiveRecord::Base.pluralize_table_names = false
Joey__
--
Posted via http://www.ruby-forum.com/.