Forum: Ruby on Rails date_select

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.
69b2ef4bce76b5b27c94e898976dc6d8?d=identicon&s=25 matthew clark (Guest)
on 2006-02-04 08:54
(Received via mailing list)
Can you see an obvious reason why this date_select code is failing?

The parameters from the form -

*Parameters*: {"commit"=>"Save All Changes", "campaign_id"=>"1",
"campaign"=>{"name"=>"fdsfas", "end_date(3i)"=>"26",
"start_date(1i)"=>"2006", "start_date(2i)"=>"1", "start_date(3i)"=>"26",
"end_date(1i)"=>"2006", "end_date(2i)"=>"1"}}

The Controller -
campaign.update_attributes(params[:campaign])


generates this -

test_campaign_edit(CampaignControllerTest):
ActiveRecord::MultiparameterAssignmentErrors: 2 error(s) on
ariessignment of
multiparameter attributes
    /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1697:in
`execute_callstack_for_multiparameter_\attributes'
    /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1677:in
`assign_multiparameter_attributes'
    /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1339:in
`attributes='
    /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1266:in
`update_attributes'

/home/mattc/minglead/config/../app/controllers/campaign_controller.rb:12:in
`campaign_edit'


I've tried both end and start time as timestamps, and even varchars, but
no
joy.

thanks,
matt
This topic is locked and can not be replied to.