# Problem with Acts As Versioned and Save v. Save Without Revision

**URL:** <https://www.ruby-forum.com/t/problem-with-acts-as-versioned-and-save-v-save-without-revision/155100>\
**Category:** Rails\
**Created:** [December 8, 2008, 2:25am UTC](https://www.ruby-forum.com/t/problem-with-acts-as-versioned-and-save-v-save-without-revision/155100 "2008-12-08T02:25:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [December 8, 2008, 2:25am UTC](https://www.ruby-forum.com/t/problem-with-acts-as-versioned-and-save-v-save-without-revision/155100/1 "2008-12-08T02:25:32Z")

</div>

Okay, I had a legacy table that had no versioning. I added Acts As  
Versioned, by adding the “version” column to said database, and adding  
the acts\_as\_versioned to the model. When I tried to “save()” a record,  
I got an “uninitialized constant ActiveRecord::Table::Version” The  
field existed in the database, and the table\_versions table was there.  
When I used “save\_without\_revision()”, the record saved without a  
problem.

Any clue on what I need to do to fix this?

---

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [December 8, 2008, 1:54pm UTC](https://www.ruby-forum.com/t/problem-with-acts-as-versioned-and-save-v-save-without-revision/155100/2 "2008-12-08T13:54:42Z")

</div>

aav also requires an xxx\_versions table (e.g., foo\_versions if you’re  
versioning foos). Check the documentation; there’s a class-level  
method added to models that acts\_as\_versioned that will create the  
version table for you if you add it to a migration.

---

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [December 15, 2008, 3:30am UTC](https://www.ruby-forum.com/t/problem-with-acts-as-versioned-and-save-v-save-without-revision/155100/3 "2008-12-15T03:30:32Z")

</div>

Sorry for the delay answering. There is a xxx\_versions table.

Crud. I think I see the problem. This is a legacy db, which has a  
table named ‘bases,’ which is a naughty table name. The singular is  
‘basis,’ which I can’t inflect because it’s a (kinda) reserved name.

So, I guess I can magically rename the table “basis\_versions” and fix  
it. I’ll give it a whirl.
