Forum: Ruby on Rails wrong number of arguments (3 for 2)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6fcc31fcd07393c0c15e39558cd17122?d=identicon&s=25 Zqj Zqj (zqj)
on 2009-03-04 02:44
 Showing vendor/plugins/community_engine/app/views/users/new.html.haml
where line #40 raised:

wrong number of arguments (3 for 2)

Extracted source (around line #40):

37:         %label{"for"=>"birthdate"}
38:           Birthday:
39:           %em (Required: you must be at least 13 years old to sign
up.)
40:         = date_select :user, :birthday, {:start_year => 1926,
:end_year => Time.now.year - 13}
41:
42:         %label{"for"=>"password"}
43:           Type your password:

RAILS_ROOT: D:/InstantRails/rails_apps/caigentan
Application Trace | Framework Trace | Full Trace

D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/date_helper.rb:651:in
`select_month'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/date_helper.rb:651:in
`send'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/date_helper.rb:651:in
`date_or_time_select'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/date_helper.rb:646:in
`each'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/date_helper.rb:646:in
`date_or_time_select'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/date_helper.rb:602:in
`to_date_select_tag_without_error_wrapping'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/active_record_helper.rb:239:in
`to_date_select_tag'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/date_helper.rb:156:in
`date_select'
vendor/plugins/community_engine/app/views/users/new.html.haml:40:in
`_run_plugin_47vendor47plugins47community_engine47app47views47users47new46html46haml'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/helpers/action_view_mods.rb:165:in
`call'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/helpers/action_view_mods.rb:165:in
`form_for_without_record_identification'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/helpers.rb:447:in
`call'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/helpers.rb:447:in
`haml_bind_proc'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/form_helper.rb:317:in
`fields_for'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/form_helper.rb:253:in
`form_for_without_haml'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/helpers/action_view_mods.rb:171:in
`form_for_without_record_identification'
vendor/plugins/community_engine/engine_plugins/simply_helpful/lib/simply_helpful/form_helper_extensions.rb:15:in
`send'
vendor/plugins/community_engine/engine_plugins/simply_helpful/lib/simply_helpful/form_helper_extensions.rb:15:in
`form_method_with_record_identification'
vendor/plugins/community_engine/engine_plugins/simply_helpful/lib/simply_helpful/form_helper_extensions.rb:5:in
`form_for'
vendor/plugins/community_engine/app/views/users/new.html.haml:26:in
`_run_plugin_47vendor47plugins47community_engine47app47views47users47new46html46haml'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in
`send'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in
`execute'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in
`send'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in
`render'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in
`render'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in
`render_template'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in
`render_file'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1108:in
`render_for_file'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:841:in
`render_with_no_layout'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/layout.rb:251:in
`render_without_benchmark'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in
`render'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in
`realtime'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in
`render'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1157:in
`default_render'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1163:in
`perform_action_without_filters'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in
`call_filters'
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:601:in
`run_before_filters'
app/controllers/application.rb:43:in `set_locale'



rails2.1
plugin: globalite


date_select :user, :birthday, {:start_year => 1926, :end_year =>
Time.now.year - 13}

???
Fdb488647484e40f785dde7134afc6d1?d=identicon&s=25 Heinz Strunk (cojones)
on 2009-03-04 13:29
Hey,

try:
date_select("user", "birthday", :start_year => 1926, :end_year =>
Time.now.year-13)
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-03-04 14:00
(Received via mailing list)
On 4 Mar 2009, at 01:44, Zqj Zqj wrote:

>
> Showing vendor/plugins/community_engine/app/views/users/new.html.haml
> where line #40 raised:
>

Only time i've seen this is with plugins that fiddle with the date
helpers, globalite may well be one of them

Fred
This topic is locked and can not be replied to.