Argument error "wrong number of aguments (2 for 1)"

Hi,

I am using rails 2.0.2 and when trying to edit table data the corresponding controller fires an argument error for the update method.

I already tried to delete the plugins (except the globalize plugin) but nothing changes.

Has anyone an idea what is wrong?

Here is the trace: c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2245:in `attributes_with_quotes' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2245:in `update_without_lock' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/locking/optimistic.rb:70:in `update_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:240:in `update_without_timestamps' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/timestamp.rb:38:in `globalize_old_update' vendor/plugins/for-1.2/lib/globalize/localization/db_translate.rb:702:in `update' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2238:in `create_or_update_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:213:in `globalize_old_create_or_update' vendor/plugins/for-1.2/lib/globalize/localization/db_translate.rb:695:in `create_or_update' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1972:in `save_without_validation' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/validations.rb:934:in `save_without_transactions' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:108:in `save' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:80:in `transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:100:in `transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:108:in `save' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:120:in `rollback_active_record_state!' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:108:in `save' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2034:in `update_attributes' app/controllers/activities_controller.rb:63:in `update' app/controllers/activities_controller.rb:62:in `update'

Hi,

I am using rails 2.0.2 and when trying to edit table data the corresponding controller fires an argument error for the update
method.

I already tried to delete the plugins (except the globalize plugin)
but nothing changes.

Has anyone an idea what is wrong?

Well have you tried removing the globalize plugin? I find it a little
suspicious that you;re loading a plugin in a directory called
'for-1.2' when your app is running 2.0.

Fred

Frederick Cheung wrote:

Has anyone an idea what is wrong?

Well have you tried removing the globalize plugin? I find it a little suspicious that you;re loading a plugin in a directory called 'for-1.2' when your app is running 2.0.

Fred

Hi Fred,

well - you are right that the problem is the Globalize (for-1.2) plugin but I wondered what was the problem. Finally I figured out that the problem occurs when switching on the model translation vía "translates :method" in the corresponding model. However, I do not know how to fix that as I still do not know a lot about Ruby and Rails but I will make a trial with keeping translations in the model and see what happens.

Jochen

Ok, and here is the corresponding ticket with patch to fix it: http://trac.globalize-rails.org/trac/globalize/ticket/184