# Checkboxes for downloading data via activerecord

**URL:** <https://www.ruby-forum.com/t/checkboxes-for-downloading-data-via-activerecord/92956>\
**Category:** Rails\
**Created:** [April 26, 2007, 1:46am UTC](https://www.ruby-forum.com/t/checkboxes-for-downloading-data-via-activerecord/92956 "2007-04-26T01:46:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgeuoa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Post date:** [April 26, 2007, 1:46am UTC](https://www.ruby-forum.com/t/checkboxes-for-downloading-data-via-activerecord/92956/1 "2007-04-26T01:46:38Z")

</div>

Hi Guys!

i have a set of stories stored in a database, each with an associated  
unique title, and obviously an id as a primary key as follows:

* * *

Story\_id —FK, integer  
Topic —Unique, varchar  
Story—Text

* * *

i have implemented a fuzzy search such that one can search for a story  
by topic or by words in the story (acts\_as\_ferret did the magic!).

Now given some hits, i want people to be able to use a check-box and  
select a story or stories from the hits and download them as ascii text  
files using the format below.

> topic1  
> blah blah blah

> topic2  
> blah blahbla

…  
how can i create a set of checkboxes each unique to a hit and can be  
used to select stories to download?  
Which is the easiest way to do this?

Thanks
