Frederick Cheung wrote:
> On Nov 10, 3:31�am, Lady Hawk <[email protected]>
> wrote:
>> I have a model called "Media", database table "Medias". I had to rename
>> that model to "Medium" and the database table to "Mediums".
>> and now when I run my application , I get the following error:
>>
>> ActiveRecord::StatementInvalid in MediumsController#index
>> SQLite3::SQLException: no such table: media: SELECT * FROM "media"
>>
> Rails things that the plural of medium is media, so is looking for a
> table called media for the model medium. Either tell the inflector
> what you want the plural of medium to be or use set_table_name
> 
> Fred

You are so true...That worked . Thanks a lot!! :-)
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to