# POST or ActiveRecord save?

**URL:** <https://www.ruby-forum.com/t/post-or-activerecord-save/110320>\
**Category:** Rails\
**Created:** [July 25, 2007, 10:07am UTC](https://www.ruby-forum.com/t/post-or-activerecord-save/110320 "2007-07-25T10:07:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [July 25, 2007, 10:07am UTC](https://www.ruby-forum.com/t/post-or-activerecord-save/110320/1 "2007-07-25T10:07:03Z")

</div>

Hi, I have an application in which I’m generating data on my PC at work  
and then sending it to a shared hosting site where a Rails application  
shares it out to the world.

I have 2 options for forwarding the data from my PC to the Rails  
application on the server:

1. Have a controller action in the Rails app that accepts the data  
through a POST operations  
e.g. POST data to something like -  
[http://example.org/data/receive\_from\_client](http://example.org/data/receive_from_client)

2. Since the data on my PC is generated by a Ruby script, it’s equally  
easy for me to use the development version of the same Rails app and use  
ActiveRecord with the database.yml properties set for the database used  
by the Rails app and save it to the database direct without going  
through the Rails application.

Is there any benefit in using one over the other? For example, does #2  
leave my Rails application appearing more responsive since it doesn’t  
use the application thread? Or am I just thinking too much?

Cheers,  
Mohit.  
7/25/2007 | 3:46 PM.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [July 25, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/post-or-activerecord-save/110320/2 "2007-07-25T16:53:41Z")

</div>

I’d say either way is fine, but IMO method #1 gives you the advantage  
of being able to update the production server from anywhere, not just  
your work PC.
