Missing attribute: reorder

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?

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

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. [email protected]