Before updating scaffolding from new db schema try creating a

21-Jun-2020 13:28

In this article, I'll walk through a basic Rails (3.2.x) setup for creating a nested resource for two models.

In addition to standard scalar properties, each class has an “association” property.

So you just updated your model and the related database schema, but your views are now obsolete. The best way is to do it manually, but it’s not the your whole model/view/controller/tests from scratch. This probably means we are not supposed to do it, don’t you think?

First, there’s no actual way to synchronize your views with your model. Both the question and the answer are quite old, and in the meantime the Rails Team didn’t develop anything that would help us regenerating our views.

As a software developer, my choice of database access tool is Microsoft’s Entity Framework (EF) so I am motivated to see how EF can handle this.

Entity Framework 6 has a number of features to make it fairly straightforward to work with existing databases.

In addition to standard scalar properties, each class has an “association” property.

So you just updated your model and the related database schema, but your views are now obsolete. The best way is to do it manually, but it’s not the your whole model/view/controller/tests from scratch. This probably means we are not supposed to do it, don’t you think?

First, there’s no actual way to synchronize your views with your model. Both the question and the answer are quite old, and in the meantime the Rails Team didn’t develop anything that would help us regenerating our views.

As a software developer, my choice of database access tool is Microsoft’s Entity Framework (EF) so I am motivated to see how EF can handle this.

Entity Framework 6 has a number of features to make it fairly straightforward to work with existing databases.

Rails gives us tons of helper methods to format prices and get things done, and that’s definitely the path to follow.