A
A
Akhmad Zakhratulaev2014-09-14 14:43:05
Ruby on Rails
Akhmad Zakhratulaev, 2014-09-14 14:43:05

How to connect to an existing database in rails?

Good day.
There is a ready-made database on firebird for the project. You need to connect via Active record and get all the benefits of ORM (do not write sql queries). Is auto-generation of the necessary models possible at all, depending on the specific structure of the database, taking into account bundles, validations, etc.?
In the future, it is planned that the database will be changed by a person who has nothing to do with ruby ​​and rails. And the question is whether this is possible and how to properly implement changes.
Used Ruby 1.9.3, Rails 4.1.0, Firebird 2.5
Thank you for your attention :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vsuhachev, 2014-09-14
@asker13

Autogeneration - I doubt it. Well, manually create a descendant class ActiveRecord::Base in app/models for each table from your database and write connections, validations, etc. this is a workable option.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question