# Missing attribute: reorder

**URL:** <https://www.ruby-forum.com/t/missing-attribute-reorder/117096>\
**Category:** Rails\
**Created:** [October 12, 2007, 10:48pm UTC](https://www.ruby-forum.com/t/missing-attribute-reorder/117096 "2007-10-12T22:48:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![will](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/90ced4/32.png) [@will](https://www.ruby-forum.com/u/will)\
**Post date:** [October 12, 2007, 10:48pm UTC](https://www.ruby-forum.com/t/missing-attribute-reorder/117096/1 "2007-10-12T22:48:38Z")

</div>

I am trying to use an integer object as a flag item for displaying a  
link on a page called reorder that is a column in my PlanProcedures  
table.

I’m getting an error that says  
The Header is NoMethodError in Manage\_plan\_procedures#list  
missing attribute: reorder

Here is what my model looks like:

> > PlanProcedure.column\_names

=\> [“id”, “plan\_id”, “procedure\_id”, “platform\_id”, “plugin\_id”,  
“user\_id”, “release\_id”, “iteration\_id”, “minimum\_priority”,  
“procedure\_iteration”, “position”, “created\_on”, “updated\_on”,  
“updated\_by”, “version”, “reorder”]

Reorder is an integer value  
Here is the code that is balked about:

\<% if plan\_procedure.reorder == 1 %\>  
\<%= link\_to(image\_tag(“blue\_sync.png”), { :controller =\>  
‘manage\_plan\_procedures’, :action =\> ‘reorder’, :id =\>  
plan\_procedure.id}, {:border =\> 0, :title =\> “Reorder Cases”, :class  
=\> “image\_link”}) %\>  
\<% end %\>

I am setting this with an update\_all  
PlanProcedure.update\_all(“reorder = 1”,“procedure\_id =  
#removed\_email\_address@domain.invalid}”)

and the reorder field is properly being set.

Has anyone seen something like this before and have any ideas?

---

<div class="post-metadata">

**Author:** ![will](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/90ced4/32.png) [@will](https://www.ruby-forum.com/u/will)\
**Post date:** [October 13, 2007, 2:02pm UTC](https://www.ruby-forum.com/t/missing-attribute-reorder/117096/2 "2007-10-13T14:02:20Z")

</div>

On 12 Oct 2007, at 21:47, Will wrote:

> 

Are you sure plan\_procedure is really a instance of what you think it  
is ?

Fred

---

<div class="post-metadata">

**Author:** ![will](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/90ced4/32.png) [@will](https://www.ruby-forum.com/u/will)\
**Post date:** [October 15, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/missing-attribute-reorder/117096/3 "2007-10-15T16:28:15Z")

</div>

Tracing through the code again I found the problem. The code I was  
working with was using a find\_by\_sql statement and it did not include  
the reorder field withing the object it created. I added it to the  
code and it works like a charm now. Thanks

Wheely

On Oct 13, 7:01 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
