Re: [Rails] Moving stand alone scripts into rails, architecture

2017-09-14 Thread Mugurel Chirica
Since I don't have too information about your scripts, I'll just guess some things. If the scripts are proved to work well (especially if you have unit tests for them), I would recommend to keep them as they are or move them to a gem and use them inside your rails app. A very simple, proof of con

Re: [Rails] Moving stand alone scripts into rails, architecture

2017-09-02 Thread Ben Edwards
On Saturday, September 2, 2017 at 5:05:10 PM UTC+1, Hassan Schroeder wrote: > > On Fri, Sep 1, 2017 at 6:50 PM, Ben Edwards > 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

Re: [Rails] Moving stand alone scripts into rails, architecture

2017-09-02 Thread Hassan Schroeder
On Fri, Sep 1, 2017 at 6:50 PM, Ben Edwards 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

Re: [Rails] Moving stand alone scripts into rails, architecture

2017-09-02 Thread Ben Edwards
Yes, I'me building a website that lists what’s on at local venues. Others have suggested I move the scripts into rails and using ActiveRecords certainly appals to me. Ime very open to suggestions/advice and if I can use ActiveRecord and the models from my ruby app, and keep the scripts stand

Re: [Rails] Moving stand alone scripts into rails, architecture

2017-09-02 Thread Greg Navis
Why do you want to move it to Rails? Is your goal to present the scraped data on a web page? If you could tell us a bit more about your goal then we'll be able to give you more specific advice. If you indeed want to present the results on a web page then I recommend that you convert your classes t

[Rails] Moving stand alone scripts into rails, architecture

2017-09-01 Thread Ben Edwards
This is going to be a bit of a long one;) I have a bunch of stand alone scripts that I want to move into rails. They are batch scripts that update the database (run from cron). Where I live the music listings websites are very incomplete so I am using web scrapers to collect listings for a li