Ruby on Rails Friday, September 1, 2017

On Fri, Sep 1, 2017 at 8:25 AM, Ben Edwards <login@funkytwig.com> wrote:
> So I basicaly recreate the tables from scratch manualy, using rails to
> create them.

NO! *IF* you have columns that don't adhere to AR conventions
you can rename them manually but that's trivial and won't affect
your existing data.

Seriously, don't overthink this -- just create the app, point it at your
DB copy and try it.

Let's say you have a table "things"; open a console and enter

class Thing < ApplicationRecord
end

That is literally all you need to start. Then "Thing.first" will show
you a record with all the attributes of a "thing".

--
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/CACmC4yCU%2BEa7GiJRfYYhXB4QGR-aqMptHGLmwMH7sdGt0qLLkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment