# Active Scaffold Without Database connection --- Help

**URL:** <https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666>\
**Category:** Rails\
**Created:** [November 9, 2009, 7:53am UTC](https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666 "2009-11-09T07:53:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![antony\_4u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@antony\_4u](https://www.ruby-forum.com/u/antony_4u)\
**Post date:** [November 9, 2009, 7:53am UTC](https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666/1 "2009-11-09T07:53:55Z")

</div>

Hi Friends,

I want to know what are ways or how to use the Active Scaffold without  
Database connection …

I mean Instead of Database I will have a CSV or Flat file…

Thro Active Scaffold Plug-in how to read this file instead of  
database…

Kindly Can I have you Ideas and Views… ASAP…

- Antony

---

<div class="post-metadata">

**Author:** ![antony\_4u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@antony\_4u](https://www.ruby-forum.com/u/antony_4u)\
**Post date:** [November 9, 2009, 3:19pm UTC](https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666/2 "2009-11-09T15:19:33Z")

</div>

On Nov 9, 1:53 am, Antony N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Kindly Can I have you Ideas and Views… ASAP…  
> Um, how about “don’t do that”? With serverless storage engines like  
> SQLite3 around, there’s no reason to fool with trying to read/write  
> everything to a CSV file.

–Matt J.

---

<div class="post-metadata">

**Author:** ![antony\_4u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@antony\_4u](https://www.ruby-forum.com/u/antony_4u)\
**Post date:** [November 9, 2009, 3:38pm UTC](https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666/3 "2009-11-09T15:38:30Z")

</div>

Mr. Jones… Its a Requirement… Just to store simple name and a  
Id…  
It will reduce my coding …

Kindly provide you suggestion.

> –Antony

---

<div class="post-metadata">

**Author:** ![antony\_4u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@antony\_4u](https://www.ruby-forum.com/u/antony_4u)\
**Post date:** [November 9, 2009, 3:44pm UTC](https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666/4 "2009-11-09T15:44:25Z")

</div>

Antony N. wrote:

> Mr. Jones… Its a Requirement… Just to store simple name and a  
> Id…  
> It will reduce my coding …

Then, if you’re really set on ActiveScaffold, and if you really need CSV  
output, use the database for storage as Matt suggested, and just write  
to CSV on demand. Matt is right that using a CSV file as a database  
makes no sense.

> Kindly provide you suggestion.
> 
> > –Antony

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![antony\_4u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@antony\_4u](https://www.ruby-forum.com/u/antony_4u)\
**Post date:** [November 10, 2009, 5:57am UTC](https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666/5 "2009-11-10T05:57:23Z")

</div>

My qus is misleading you all I hope …

Actual Scenario is … In out project there are lot of config  
pages…

ex : Setting server time…

so in csv or flat file … it will not be more then 3 records…

we have 10 config like this as of now later it will be around 20…

If I use Active scaffold means I don’t need to create views

I hope you get my point …

-Antony

---

<div class="post-metadata">

**Author:** ![antony\_4u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@antony\_4u](https://www.ruby-forum.com/u/antony_4u)\
**Post date:** [November 10, 2009, 12:35am UTC](https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666/6 "2009-11-10T00:35:41Z")

</div>

I’ll second Marnen’s idea.

With a DB you’ll get random access to any record. Using a CSV you’ll  
either have to read record by record until you find what you need or  
dump everything to an array or hash and then get it from there. I  
think it’s actually more work going the CSV approach.

On Nov 9, 9:44 am, Marnen Laibow-Koser \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![antony\_4u](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@antony\_4u](https://www.ruby-forum.com/u/antony_4u)\
**Post date:** [November 10, 2009, 6:02am UTC](https://www.ruby-forum.com/t/active-scaffold-without-database-connection-help/178666/7 "2009-11-10T06:02:19Z")

</div>

Antony N. wrote:

> My qus is misleading you all I hope …
> 
> Actual Scenario is … In out project there are lot of config  
> pages…
> 
> ex : Setting server time…
> 
> so in csv or flat file … it will not be more then 3 records…
> 
> we have 10 config like this as of now later it will be around 20…
> 
> If I use Active scaffold means I don’t need to create views
> 
> I hope you get my point …

You’re not listening. Let me make it clearer.

Do not use ActiveScaffold with a CSV file – it will not work. Use  
ActiveScaffold with a database. If no database, then no ActiveScaffold.  
Is that clear now?

> -Antony

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
