That is possible by leveraging the object-relational mapping code in Rails's ActiveRecord class that is the base class for all models (including your patient class.
通过利用 Rails ActiveRecord 类的对象-关系映射代码,这是可以实现的,该类是所有模型的基类(包括 patient 类)。
Why do people want to base their object models on existing data schemas?
为什么人们想以已有的数据模式作为对象模型的基础?
应用推荐