Topic: [First post] Creating an app to keep my finances in check

If this is the wrong part of the forum, please move it

Hey! At the beginning of next year I'll start a new job were they program RoR so this is practice. I've read a few tutorials but this will be my first take on a real web-app. I have been developing PHP for 10 years so it's nice to try something new.

The app will consist of two parts, one RoR and one Chrome extension (I guess)

Chrome extension
- - - - - - - - - - - - - - - - - - - - - - - - - -
- Collect data (payments done with my debit card on my bank's web site)
- Format data into a Rails post
- Send the post cross domain to the web app

Rails app
- - - - - - - - - - - - - - - - - - - - - - - - - -
- When a post arrives add the incoming data to db
- Sort the payments by different pre-defined tags (will probably make this part dynamic sometime)
- On login (from user aka me) display stats on what I put my money on


My problem
- - - - - - - - - - - - - - - - - - - - - - - - - -
When you use CRUD in Rails and you want to create a new db-entry you just use an url like: POST:domain.com/db-model/value1/value2/value3 etc. When I do my post from the Chrome extension, I probably want to send a lot of entries at once. How do I do that? It would be stupid to do multple posts since that could take a lot of extra time and it seems to me kinda stupid. Suggestions?

Re: [First post] Creating an app to keep my finances in check

Hi lannor!

lannor wrote:

My problem
- - - - - - - - - - - - - - - - - - - - - - - - - -
When you use CRUD in Rails and you want to create a new db-entry you just use an url like: POST:domain.com/db-model/value1/value2/value3 etc. When I do my post from the Chrome extension, I probably want to send a lot of entries at once. How do I do that? It would be stupid to do multple posts since that could take a lot of extra time and it seems to me kinda stupid. Suggestions?

In Rails the url should look like: domain.com/controller_name_in_plural. And every writing request you want to do should be a POST-request. The clear benefit of doing it this way is that you can transfer as much data as you want in one request without hitting the 255 character limit for urls and it conforms to the http specification. The rails guides page on rubyonrails.org is a good starting point for this: guides.rubyonrails.org.

Greetz,
Benny