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 =
#{ procedure.id}")
and the reorder field is properly being set.
Has anyone seen something like this before and have any
ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails" group.
To post to this group, send email to rubyonrails googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-unsubscribe googlegroups.com
For more options, visit this group at http://gro
ups.google.com/group/rubyonrails
-~----------~----~----~----~------~----~------~--~---
|