# check\_box

**URL:** <https://discuss.rubyonrails.org/t/check-box/12321>\
**Category:** rubyonrails-talk\
**Created:** [April 30, 2007, 9:05am UTC](https://discuss.rubyonrails.org/t/check-box/12321 "2007-04-30T09:05:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Armitage](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Armitage](https://discuss.rubyonrails.org/u/Armitage)\
**Post date:** [April 30, 2007, 9:05am UTC](https://discuss.rubyonrails.org/t/check-box/12321/1 "2007-04-30T09:05:02Z")

</div>

I am sure this is a trivial problem for a rails guru!

all I want to do is display an appropriately cheched check\_box in a table, so:

instead of \<% for t in @patient.histories%\>

&nbsp;&nbsp;\<tr\> &nbsp;&nbsp;&nbsp;&nbsp;\<td\>\<%= t.ihd %\>\</td\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\</tr\> \<%end%\>

I want something like:

\<% for t in @patient.histories%\>

&nbsp;&nbsp;\<tr\> &nbsp;&nbsp;\<td\>\<%=check\_box\_tag"diabetes", t.ihd %\>\</td\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\</tr\> \<%end%\>

(hope that makes sense!) I have tried many permutations of the above and I can't make it work! All ideas gratefully recieved!
