# NoMethodError and the select form helper

**URL:** <https://discuss.rubyonrails.org/t/nomethoderror-and-the-select-form-helper/6856>\
**Category:** rubyonrails-talk\
**Created:** [January 8, 2007, 6:24am UTC](https://discuss.rubyonrails.org/t/nomethoderror-and-the-select-form-helper/6856 "2007-01-08T06:24:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwicks](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@pwicks](https://discuss.rubyonrails.org/u/pwicks)\
**Post date:** [January 8, 2007, 6:24am UTC](https://discuss.rubyonrails.org/t/nomethoderror-and-the-select-form-helper/6856/1 "2007-01-08T06:24:08Z")

</div>

I am trying to create a listing of objects in a table with a drop down box to edit one particular aspect of each thing in the list , but I can not even get the form to render without getting a NoMethodError. Currently I have something like this:

\<% for thing in @things %\> &nbsp;&nbsp;//...table stuff here... &nbsp;&nbsp;&nbsp;&nbsp;\<td\>\<%=h thing.element1 %\>\</td\> &nbsp;&nbsp;&nbsp;&nbsp;\<td\>\<%=h thing.element2 %\>\</td\> &nbsp;&nbsp;&nbsp;&nbsp;\<td\>\<%=h thing.element3 %\>\</td\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//...etc, etc, and then I have the following which give me a NoMethodError... &nbsp;&nbsp;&nbsp;&nbsp;\<td\>\<%= select('thing', 'elementx', ['choice1', choice2'], :selected =\> thing.elementx ) %\>

\<% end %\> \</table\>

Of course, once I fix this get the form to actually render, I still haven't quite figured out how I would then update all instances of this object with their (possibly new) values. I assume that I would just have to iterate through @things and call update\_attributes on each element, but I'm not quite sure how to do that

Sorry if this is a bit of a stupid question, I'm a still learning.

Thanks, Paul
