google-code-export / calendardateselect

Automatically exported from code.google.com/p/calendardateselect
Other
0 stars 0 forks source link

"wrong number of arguments" error, calendar_date_select form helper (InstanceTag) #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm not sure why all the tests pass, because I'm getting an error every
time I use the calendar_date_select helper:

wrong number of arguments (5 for 4):
[...] calendar_date_select.rb:178:in `initialize'

That line, 178:

tag = ActionView::Helpers::InstanceTag.new(object, method, self, nil,
options.delete(:object))

Checking rails source for that call -- not sure where the 'nil' fits in:

class InstanceTag [...]
  def initialize(object_name, method_name, template_object, object = nil)

If I take out the 'nil', everything works. I'd submit a patch but it seems
so stupid, I must be missing something... the tests seem to run just fine. 

(ah, a sidenote, I can't rake tests:plugins because
helper_methods_test::setup seems to be overriding the
calendar_date_select::setup)

==
On edge rails [cb21db1a334e6ca2695d4e7183b1bdce204b9eb3]

Original issue reported on code.google.com by frayju...@gmail.com on 2 Aug 2008 at 6:00

GoogleCodeExporter commented 9 years ago
I see the same issue and removing the 'nil' value fixes it.

Original comment by mdirwi...@att.net on 22 Aug 2008 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by timchar...@gmail.com on 30 Sep 2008 at 3:35

GoogleCodeExporter commented 9 years ago
I feel the same.. thanks for the fix...

Original comment by chad...@gmail.com on 15 Oct 2008 at 2:59

GoogleCodeExporter commented 9 years ago
Turns out in on 2 july 08, this commit
http://github.com/rails/rails/commit/7098143f07bd03223bbbeea8a9c23506a7b5dffc#di
ff-1
removed the unused 'nil' parameter.

Not sure what version of rails that, or how exactly to make the plugin backwards
compatible?  Is there a way to call text_field or hidden_field directly, 
depending on
calendar_options[:hidden] / calendar_options[:embedded] ?

Original comment by frayju...@gmail.com on 15 Oct 2008 at 8:01

GoogleCodeExporter commented 9 years ago
um, sorry, should have realized there's a separate edge_rails branch on github.

http://github.com/timcharper/calendar_date_select/tree/edge_rails

Original comment by frayju...@gmail.com on 15 Oct 2008 at 8:04

GoogleCodeExporter commented 9 years ago

Original comment by timchar...@gmail.com on 30 Nov 2008 at 8:51