Implementation guidance, please


I just want some validation or correct to my implementation plan for a
modest, Rails-based Payroll system.

  1. The input is going to be a set of weekly spreadsheets (in CVS form)
    which the user will copy from time to time into, say, a manually
    created repository Payroll\public\data. OK?

  2. I tested that I could extract data coherently from a CVS file with
    Ruby. The FasterCVS package did the job very well.

  3. I tested that I could create a web app to extract filenames from a
    directory and display them in a browser. The toy demo is stored in

Am I correct in believing I can write code (in the .erb files in
Payroll\app\views\payrolls) which can access files in the newly
created directory …....\public\data.

Does this make sense?

Thanks in Advance,

Here’s what I would do, knowing very little about what you want your
app to accomplish:

  1. write a RoR script that reads .csv files from the file system and
    creates records for each .csv file row in a database (sqlite3 or
    mysql) table (maybe named PayRecords).

  2. use the RoR script/generate scaffold PayRecords. this will create
    a controller, model and RESTful views.

  3. use script/server to start your server and point your browser to

  4. next, fill in the view details based on the database fields and
    the order you want to see data presented.

  5. fill in code in the controller and model as needed to get the data
    computation and validation checks you need.

On Nov 5, 8:31 pm, RichardOnRails

Hi DL,

I thought I posted a reply to your response, but I don’t see it on
this thread, so let me add it now. I’m (slowly) trying to apply your
guidance. I’ll probably run into some problems, but I post specific
questions if I can’t find solution in the half-dozen Rails book I have
nor through Google searches.

Finally, thanks for your response and accept my apologies for not
acknowledging your response promptly.

Best wishes,