On May 22, 2015, at 2:32 PM, kenatsun <kenat...@gmail.com> wrote: > > My question is about how to align the Rails contents (model definitions) with > the database contents (table definitions), so that the app can read from and > write to the tables.
Largely, you just ignore migrations and mostly ignore Rails models. Inherit from ActiveRecord::Base, list the attributes that can be bulk set, and you’re done. Rails connects to the db and reads the schema. Now of course you will wind up adding validations and calculations and relations and so forth, and you may have to specify the table name if it doesn’t follow RoR conventions. But really, the answer to your question is not just “yes”, it’s “yes and it’s so easy that you’re completely missing it by looking for something harder” ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice -- 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+unsubscr...@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/6F8840BE-FBA7-4AF9-9ABC-BC281D351C92%40elevated-dev.com. For more options, visit https://groups.google.com/d/optout.