.save message undefined method ' ='

I am fairly new to rails and am working on a system that is currently being developed with Rails 1.1.6. I am trying to do a save on a object that is giving me an undefined method message

Here is what I have.

Ruby 1.8.4 Rails 1.1.6

reorder is an iteger in the PlanProcedures table. I am running mysql 5.

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"]

@plan_procedure = PlanProcedure.find(params[:id])

@plan_procedure.reorder = 0 @plan_procedure.save

undefined method `reorder=' for #<PlanProcedure::Version:0xb7a3c098>

Will wrote:

I am fairly new to rails and am working on a system that is currently being developed with Rails 1.1.6. I am trying to do a save on a object that is giving me an undefined method message

Here is what I have.

Ruby 1.8.4 Rails 1.1.6

reorder is an iteger in the PlanProcedures table. I am running mysql 5.

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"]

@plan_procedure = PlanProcedure.find(params[:id])

@plan_procedure.reorder = 0 @plan_procedure.save

undefined method `reorder=' for #<PlanProcedure::Version:0xb7a3c098>

Unless there's some problem with the versioning plugin, try switching to the C MySQL Ruby bindings if you're using the pure Ruby version.

I tried to add the C

I tried to add the C bindings and it did not appear to resolve the problem. I am beginning to think it may be an issue with 1.1.6. Perhaps resolved within 1.2.3. I am looking to move this system to 1.2.3 which is another issue altogether. When I am running a create on my PlanProcedure class it also gives me this error. When I remove the extra column 'reorder' it appears to be OK as far as creating?

Here is what I have found... If I do a migration and add a field to my PlanProcedure < ActiveRecord::Base with 1.1.6 any .saves or updates to this class appear to fail out with this undefined method `added column name=' for #<PlanProcedure... Does anyone know if this is something resolved in the 1.2.3 update???

Will wrote:

Here is what I have found... If I do a migration and add a field to my PlanProcedure < ActiveRecord::Base with 1.1.6 any .saves or updates to this class appear to fail out with this undefined method `added column name=' for #<PlanProcedure... Does anyone know if this is something resolved in the 1.2.3 update???

After adding the column in the migration you have to call PlanProcedure.reset_column_information before you can do any saves or updates within the migration.