# How can I find out which attribute is screwing up pluralize/

**URL:** <https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218>\
**Category:** Rails\
**Created:** [January 18, 2007, 10:02am UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218 "2007-01-18T10:02:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 18, 2007, 10:02am UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218/1 "2007-01-18T10:02:51Z")

</div>

Hey there 🙂

I’m creating this app on top of a legacy database, that has a mixture  
of auto\_inc ids, non-‘id’ named pks, non-integer-pks, foreign keys that  
end in \_code instead of \_id, etc.

I have the model working great in the console, where I can create any  
modeled object and reference other objects without issues.

However, I’m running into problems with plugins such as GLoc and  
Scaffold Extension, seemingly because of some attribute names.  
Scaffolding works without the plugins, but once they’re installed, I  
get errors like this which is from the Scaffolding Extension:

ArgumentError in Admin/crud#edit  
Showing vendor/plugins/scaffolding\_extensions/scaffolds/edit.rhtml  
where line #3 raised:  
wrong number of arguments (0 for 1)  
Extracted source (around line #3):  
1:

# Editing \<%= @scaffold\_singular\_name.humanize.downcase %\>
  
2:  
3: \<%= scaffold\_form(‘update’,  
:fields=\>@scaffold\_class.scaffold\_edit\_fields) %\>  
4:  
5: \<%= association\_links %\>  
6:

RAILS\_ROOT: /home/daniel/Documents/Projects/Eclipse/polybook/config/…

Thing is, this is great info: so, there’s a wrong number of arguments,  
great! But for which method, and what kind of argument did it expect?  
What was happening at the time, stuff like that. I can’t guess (not in  
proper time anyway) which attribute(s) caused this error, so how do I  
find out? If I knew how to use the Ruby/Rails debugger, I guess that  
would be great, except it supposedly doesn’t work with Ruby 1.8.5.

Help please!

Thanks,  
Daniel 🙂

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 18, 2007, 5:47pm UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218/2 "2007-01-18T17:47:49Z")

</div>

On 1/18/07, Daniel Smedegaard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> However, I’m running into problems with plugins such as GLoc and  
> 2:  
> What was happening at the time, stuff like that. I can’t guess (not in  
> proper time anyway) which attribute(s) caused this error, so how do I  
> find out? If I knew how to use the Ruby/Rails debugger, I guess that  
> would be great, except it supposedly doesn’t work with Ruby 1.8.5.
> 
> Help please!

If you provide a backtrace (check the Rails log) and the contents of  
the appropriate model file(s), I’ll be able to help you (I’m the  
author of the plugin).

Jeremy

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 20, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218/3 "2007-01-20T18:56:01Z")

</div>

Hi Jeremy!

Coool! I’ll up those things to you just as soon as Monday comes (right  
now there’s a beer next to my mouse, a girlfriend and pizzas coming,  
and tomorrow is sushi galore, then comes Monday workie day, LOL 🙂

Till then, great weekend, kick ass, all that 😃

Daniel

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 22, 2007, 9:47am UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218/4 "2007-01-22T09:47:23Z")

</div>

Hey hey 🙂

I wasn’t running 1.2 before, but I just upgraded, and now that I am, it  
seems to work fine! And damn, it looks sweet! 🙂

Thanks! 🙂

Daniel

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 21, 2007, 5:18am UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218/5 "2007-01-21T05:18:09Z")

</div>

On 1/20/07, Daniel Smedegaard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Coool! I’ll up those things to you just as soon as Monday comes (right  
> now there’s a beer next to my mouse, a girlfriend and pizzas coming,  
> and tomorrow is sushi galore, then comes Monday workie day, LOL 🙂
> 
> Till then, great weekend, kick ass, all that 😃

Also, make sure that you are running the latest revision of the plugin  
if you are running on Rails 1.2. Previous versions (more than a day  
old) are designed for Rails 1.1, and will give the error you got with  
1.2.

Jeremy

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 23, 2007, 11:03am UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218/6 "2007-01-23T11:03:33Z")

</div>

Hmmm…

Not sure what’s going on here, but I’m back to getting the errors…  
Right now it’s “wrong number of arguments (0 for 1)”, a few minutes  
back it was “uninitialized constant”.

Could I persuade you to try and create the database by you and see what  
happens when you try to scaffold? I have quite a few model files,  
perhaps it would be better if I could send them all to you via e-mail?  
You can e-mail me 🙂

Cheers,  
Daniel 🙂

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 23, 2007, 11:03am UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218/7 "2007-01-23T11:03:34Z")

</div>

Hmmm…

Not sure what’s going on here, but I’m back to getting the errors…  
Right now it’s “wrong number of arguments (0 for 1)”, a few minutes  
back it was “uninitialized constant”.

Could I persuade you to try and create the database by you and see what  
happens when you try to scaffold? I have quite a few model files,  
perhaps it would be better if I could send them all to you via e-mail?  
You can e-mail me 🙂

Cheers,  
Daniel 🙂

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 23, 2007, 11:17am UTC](https://www.ruby-forum.com/t/how-can-i-find-out-which-attribute-is-screwing-up-pluralize/82218/8 "2007-01-23T11:17:44Z")

</div>

Daniel Smedegaard B. wrote:

> 

Sorry, sorry, sorry! It was a failure to update my model after changing  
the name of an associated table! All is well. I’ll shut up now 🙂

Also sorry about the double posts, I don’t know what’s up with Google.  
I’m replying through “more options” now, might fix it.
