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

Hey there :slight_smile:

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 :slight_smile:

On 1/18/07, Daniel Smedegaard B. [email protected] 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

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 :slight_smile:

Till then, great weekend, kick ass, all that :smiley:

Daniel

Hey hey :slight_smile:

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! :slight_smile:

Thanks! :slight_smile:

Daniel

On 1/20/07, Daniel Smedegaard B. [email protected] 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 :slight_smile:

Till then, great weekend, kick ass, all that :smiley:

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

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 :slight_smile:

Cheers,
Daniel :slight_smile:

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 :slight_smile:

Cheers,
Daniel :slight_smile:

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 :slight_smile:

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.