wrong number of arguments (3 for 2)

wrong number of arguments (3 for 2) I am getting this error for the
following lines. I have moved to Rails 3.2.6 and am facing this problem
here. It worked in Rails 2.3.5

config.nested.add_link( 'Procs', [:historical_testprocedures], :action
=> 'editprocedures', :controller => 'Testruns' )
config.nested.add_link( 'Regr.', [], :action => 'createregression',
:controller => 'Testruns', :confirm => msg, :page => true )
config.nested.add_link( 'XML', [], :action => 'xml_export', :page =>
true )
config.field_search.columns = [ :Timestamp, :Scope,
:Location,:release,:tester, :witness, :regressionof, :results, :closed,
:tracematrix ]

wrong number of arguments (3 for 2) I am getting this error for the
following lines. I have moved to Rails 3.2.6 and am facing this problem
here. It worked in Rails 2.3.5

config.nested.add_link( 'Procs', [:historical_testprocedures], :action
=> 'editprocedures', :controller => 'Testruns' )

Look at the docs for add_link and you will see it only takes two
params, the second of which is the options, so you have too many
parameters as the error says.

Colin

yaa...but this line throws no error

config.nested.add_link(:procedureexecutions, :label => "Run", :inline
=> false)

Colin Law wrote in post #1070901:

That’s two params: Symbol (:procedureexecutions), followed by a hash (which omits {}): :label => “Run”, :inline
=> false )

So that’s fine.

Do u have an idea as to how I can change my code in order to make it
work?

Gintautas S. wrote in post #1070904:

Upgrading from Rails 2.x to Rails 3.x could be a challenge. You simply got to investigate yourself whether the gems you were using in 2.x version are compatible with Rails 3.x, if so, then errors are simply telling you that something have changed and you got to update your code.

It is also unlikely that that’s the only problem related to migration from 2.x to 3.x; that’s why I believe you got to learn it yourself, only asking questions that got you stuck for a long time.

I have recently gone down this rabbit hole, and one piece of advice I got was to do it in stages. First, make sure you have working tests for everything. Next, upgrade 2.3 as far as it will go, since that will shake out some 1.8.6 to 1.8.7 bugs. Then upgrade from 2.3.latest to 3.0 (there’s a railscast covering this). Then go to 3.1, and finally to 3.2. It only seems like more work to do it in this way. You may discover that trying to do it in one jump is either impossible, or more work than starting over from scratch.

Walter