# 1 error(s) on assignment of multiparameter attributes - Very Strange

**URL:** <https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes-very-strange/119066>\
**Category:** Rails\
**Created:** [November 2, 2007, 7:27pm UTC](https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes-very-strange/119066 "2007-11-02T19:27:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GPB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@GPB](https://www.ruby-forum.com/u/GPB)\
**Post date:** [November 2, 2007, 7:27pm UTC](https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes-very-strange/119066/1 "2007-11-02T19:27:17Z")

</div>

Hello…

Well, I post this one without too much hope that someone will be able  
to give me an answer, because it is strange.

I have a time select field, the field on the database is of type time  
only.

When creating a document, as long as the time is not greater than  
14:00, then it saves as 00:00, but if the time is greater than 14:00  
and less than 22:00 then it throws this error:

1 error(s) on assignment of multiparameter attributes

Too make things fun, when I update the document, no problem, I can  
enter any time and it saves.

Here are the values being passed, in this example, the dropofftime is  
20:20.

Parameters: {“commit”=\>“Create”, “shipment”=\>{“num\_boxes2”=\>“0”,  
“clientref”=\>“23242”, “AWB”=\>“34556”, “num\_boxes3”=\>“0”, “weight”=\>"",  
“box\_type1”=\>"", “shipper\_id”=\>“3”, “box\_type2”=\>"",  
“dropofftime(1i)”=\>"", “box\_type3”=\>"", “dropofftime(2i)”=\>"",  
“dropofftime(3i)”=\>"", “dropofftime(4i)”=\>“20”,  
“dropofftime(5i)”=\>“20”, “consignee\_id”=\>“2”, “num\_boxes1”=\>“0”}}

Full trace follows:

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active\_record/  
base.rb:2097:in `execute_callstack_for_multiparameter_attributes' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/ base.rb:2077:in`assign\_multiparameter\_attributes’  
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active\_record/  
base.rb:1678:in `attributes=' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/ base.rb:1508:in`initialize\_without\_callbacks’  
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active\_record/  
callbacks.rb:225:in `initialize' C:/ruby/bin/TrackAndTrace/app/controllers/shipments_controller.rb: 57:in`new’  
C:/ruby/bin/TrackAndTrace/app/controllers/shipments\_controller.rb:  
57:in `create' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ base.rb:1101:in`send’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action\_controller/  
base.rb:1101:in `perform_action_without_filters' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ filters.rb:696:in`call\_filters’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action\_controller/  
filters.rb:688:in `perform_action_without_benchmark' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ benchmarking.rb:66:in`perform\_action\_without\_rescue’  
C:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ benchmarking.rb:66:in`perform\_action\_without\_rescue’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action\_controller/  
rescue.rb:83:in `perform_action' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ base.rb:435:in`send’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action\_controller/  
base.rb:435:in `process_without_filters' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ filters.rb:684:in`process\_without\_session\_management\_support’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action\_controller/  
session\_management.rb:114:in `process' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ base.rb:334:in`process’  
C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/dispatcher.rb:41:in  
`dispatch' C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb: 113:in`handle\_dispatch’  
C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick\_server.rb:79:in  
`service' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in`service’  
C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in`start\_thread’  
C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in`start\_thread’  
C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in`each’  
C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in`start’  
C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start' C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:63:in`dispatch’  
C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/servers/  
webrick.rb:59  
C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/  
dependencies.rb:495:in `require' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:342:in`new\_constants\_in’  
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/  
dependencies.rb:495:in `require' C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/server.rb:39 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require’  
script/server:3

Any help, greatly appreciated.

Thanks,

GPB

---

<div class="post-metadata">

**Author:** ![GPB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@GPB](https://www.ruby-forum.com/u/GPB)\
**Post date:** [November 7, 2007, 1:13am UTC](https://www.ruby-forum.com/t/1-error-s-on-assignment-of-multiparameter-attributes-very-strange/119066/2 "2007-11-07T01:13:59Z")

</div>

Well I figured it out.

I was using \<%= time\_select ‘shipment’, ‘dropofftime’, :include\_blank  
=\> false %\>

Even though include\_blank does give a blank option in the select list,  
it seems it forces rail to interpret the field as a datetime\_select  
field instead of a time only field.

This is why the form was passing dropofftime(1i) to dropofftime(4i)  
instead of only two necesarry for the hours and the minutes. Depending  
on the time selected, it would sometime fail, since it would interpret  
it as a date.

Take out the include\_blank, and the problem is fixed.

However, I think the include\_blank should be available and not cause  
this unexpected behavior. Anyone know how to get blanks for a  
time\_select field?

GPB
