On Friday, September 1, 2017 at 2:56:35 PM UTC+1, Ben Edwards 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? I have found this, https://codeburst.io/how-to-build-a-rails-app-on-top-of- whitch looks usefull (and done a load of googleing) but figured this must be something that people have done before and documenter in a guide/howto. Can someone point me in the wright direction?an-existing-database- baa3fe6384a0
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/a102680c-2a74-48ff-88fb-226be9e0f3b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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.
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/96909e04-ba99-4a55-8479-05ce771b6407%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.