On Fri, Sep 1, 2017 at 6:50 PM, Ben Edwards <
lo...@funkytwig.com> wrote:
> So do I put the venue and event methods in to controllers or is there
> somewhere else. The venue and event classes map to tables which is why this
> seems the way to go. I want to put them into rails so I can use
> ActiveRecords, and also because it feels like the correct thing to do? I
> then need to work out how to change the setters in Active record, or maybe
> not, but at the moment I simply am trying to work out where the methods go.
Uh. That whole paragraph is such a mish-mash that it leads to me
believe that you don't have a clear picture of the MVC pattern that
Rails embodies.
Foe one thing, classes ("models") derived from ActiveRecord are
just that, models, *not* controllers. Controllers do not "map to tables".
You might want to, as Colin suggested, run through a tutorial before
going any further.
Then decide if it makes sense to combine your data import function
with the Rails *data display* function.
--
Hassan Schroeder ------------------------
hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote