# .save message undefined method ' ='

**URL:** <https://www.ruby-forum.com/t/save-message-undefined-method/112145>\
**Category:** Rails\
**Created:** [August 15, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/save-message-undefined-method/112145 "2007-08-15T22:08:35Z")\
**Posts on this page:** 6\
**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:** [August 15, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/save-message-undefined-method/112145/1 "2007-08-15T22:08:35Z")

</div>

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

---

<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:** [August 17, 2007, 11:51am UTC](https://www.ruby-forum.com/t/save-message-undefined-method/112145/2 "2007-08-17T11:51:28Z")

</div>

Will wrote:

> reorder is an iteger in the PlanProcedures table.  
> @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.

–  
We develop, watch us RoR, in numbers too big to ignore.

---

<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:** [August 21, 2007, 4:18pm UTC](https://www.ruby-forum.com/t/save-message-undefined-method/112145/3 "2007-08-21T16:18:41Z")

</div>

I tried to add the C

---

<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:** [August 21, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/save-message-undefined-method/112145/4 "2007-08-21T23:05:55Z")

</div>

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???

---

<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:** [August 22, 2007, 3:48am UTC](https://www.ruby-forum.com/t/save-message-undefined-method/112145/5 "2007-08-22T03:48:23Z")

</div>

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.

–  
We develop, watch us RoR, in numbers too big to ignore.

---

<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:** [August 21, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/save-message-undefined-method/112145/6 "2007-08-21T16:38:48Z")

</div>

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?
