ruby - Rails model singular format -


this more question see if error has occurred when creating model in app.

i have created model in usual way

rails g model media 

now thought create following

 class createmedias < activerecord::migration    def change      create_table :medias |t|        t.timestamps      end    end  end 

but didnt created

  class createmedia < activerecord::migration     def change       create_table :media |t|         t.timestamps       end     end   end 

i thought model represented single media database consists of many medias. why migration not change medias? best delete model , try again or normal behaviour?

thanks

media plural of medium.

the clean way have medium model , media table name.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -