Ruby on Rails Friday, September 1, 2017

On Fri, Sep 1, 2017 at 6:56 AM, Ben Edwards <login@funkytwig.com> wrote:
> Hi, I have a fairly simple database with a few tables and want to build a
> rails app on it. I know I need to do some changes to make it conform to
> ActiveRecord conventions but when I have done that how do I best access it
> from rails?

Really, all you need to do is generate a new rails app with postgres
specified as the database and configure it to use the existing DB
(presumably the copy you've modified to be more AR-compliant).

That "schema_to_scaffold" gem *might* be useful -- it looks pretty
old so hard to tell without trying it -- but if you have "a few" tables
then creating AR Models from them manually won't be a lot of work.

Do make use of `git` to save your work as you go -- you'll probably
wind up throwing away some experiments :-)

HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yCSk8GRu0udDZiV93Zq6w38gpLuz95c6DVqg6inzL6dXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment