# Scaffold strangeness

**URL:** <https://www.ruby-forum.com/t/scaffold-strangeness/121088>\
**Category:** Rails\
**Created:** [November 23, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/scaffold-strangeness/121088 "2007-11-23T16:40:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 23, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/scaffold-strangeness/121088/1 "2007-11-23T16:40:42Z")

</div>

I have a table called ‘Books’ with a field ‘page\_count’. When I  
generate a scaffold for this table the ‘\_form.rhtml’ partial does not  
include this field. Changing the name to ‘page\_coun’ and it is  
included in the form partial.

Any ideas why the word count in the field name is causing the scaffold  
to miss it out?

Thanks,

David.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 23, 2007, 8:51pm UTC](https://www.ruby-forum.com/t/scaffold-strangeness/121088/2 "2007-11-23T20:51:17Z")

</div>

“xxx\_count Maintains a counter cache for the child table xxx”

I think thats the problem.

On Nov 23, 2007 12:40 PM, Dave M [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> David.
> 
> >

–  
Rafael Mueller  
[http://queroseragil.wordpress.com](http://queroseragil.wordpress.com)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 23, 2007, 8:53pm UTC](https://www.ruby-forum.com/t/scaffold-strangeness/121088/3 "2007-11-23T20:53:38Z")

</div>

[http://api.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html](http://api.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html)  
Search for “counter\_cache”

## Regards

Rafael Mueller

> **[Quero ser Ágil](https://queroseragil.wordpress.com)**
>
> Idéias e experiências de um desenvolvedor em busca da Agilidade
