Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails 3:how to generate models for existing database tables

I've configured my database.yml to point to my existing mysql database

how can I generate models from it?

rails generate model existing_table_name

only gives an emty model..

like image 251
dark_ruby Avatar asked Nov 07 '10 20:11

dark_ruby


1 Answers

You can try Rmre. It can create models for existing schema and it tries to create all relationships based on foreign keys information.

like image 187
Boško Ivanišević Avatar answered Dec 01 '22 22:12

Boško Ivanišević