# Text\_field for join table metadata with HMT

**URL:** <https://www.ruby-forum.com/t/text-field-for-join-table-metadata-with-hmt/145435>\
**Category:** Rails\
**Created:** [August 9, 2008, 8:26am UTC](https://www.ruby-forum.com/t/text-field-for-join-table-metadata-with-hmt/145435 "2008-08-09T08:26:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![powertoold](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@powertoold](https://www.ruby-forum.com/u/powertoold)\
**Post date:** [August 9, 2008, 8:26am UTC](https://www.ruby-forum.com/t/text-field-for-join-table-metadata-with-hmt/145435/1 "2008-08-09T08:26:16Z")

</div>

Hello,

I am having trouble making a text\_field that changes the attribute of a  
column in a join table (made using has\_many :through).

Here a summary of my code:

#Table  
create\_table thingstuff: thing\_id, stuff\_id, helpme

#Relationship  
thing has\_many stuffs :through thingstuff

#Code  
for thing in @stuff.find(:all)  
text\_field “thing[thingstuff]”, “helpme”, :size =\> 2

So, of course, that doesn’t work. What I want to do is change the  
“helpme” attribute that is related to the “thing” and “stuff”. There is  
only 1 row in “thingstuff” that has a specific “thing” and “stuff”.

Would someone shed light on this ordeal? I might be using the wrong  
approach.

---

<div class="post-metadata">

**Author:** ![powertoold](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@powertoold](https://www.ruby-forum.com/u/powertoold)\
**Post date:** [August 10, 2008, 7:14am UTC](https://www.ruby-forum.com/t/text-field-for-join-table-metadata-with-hmt/145435/2 "2008-08-10T07:14:32Z")

</div>

Create a boolean attribute that connects to a checkbox. Without any  
specific info about your app it’s difficult to give sugestions

[Http://www.rubyplus.org](Http://www.rubyplus.org)  
Free Ruby & Rails screencasts

On Aug 8, 2008, at 11:26 PM, “Long N.” \<rails-mailing-list@andreas-
