# Implementation guidance, please

**URL:** <https://www.ruby-forum.com/t/implementation-guidance-please/152660>\
**Category:** Rails\
**Created:** [November 6, 2008, 5:32am UTC](https://www.ruby-forum.com/t/implementation-guidance-please/152660 "2008-11-06T05:32:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [November 6, 2008, 5:32am UTC](https://www.ruby-forum.com/t/implementation-guidance-please/152660/1 "2008-11-06T05:32:30Z")

</div>

Hi,

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  
[http://www.pastie.org/308486](http://www.pastie.org/308486).

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,  
Richard

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [November 6, 2008, 10:41am UTC](https://www.ruby-forum.com/t/implementation-guidance-please/152660/2 "2008-11-06T10:41:16Z")

</div>

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  
http:///localhost:3000/pay\_records.

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

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [November 17, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/implementation-guidance-please/152660/3 "2008-11-17T22:06:35Z")

</div>

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,  
Richard
