I am seeing something very strange that does not appear to happen on OSX. Can anyone confirm if this is a valid issue/bug?
I have created a datetime_select with the following code:
<%= datetime_select(:album, :release_date, :start_year => 1960) %>
When i select any year 1970 and above the submit form works fine and i can debug(:params) no prob… but if i submit 1969 and older, I get the following:
ActiveRecord::MultiparameterAssignmentErrors in PublicController#create
1 error(s) on assignment of multiparameter attributes
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2094:in execute_callstack_for_multiparameter_attributes' c:/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.15.3/lib/active_record/base.rb:2074:in
assign_multiparameter_attributes’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1675:in attributes=' c:/ruby/lib/ruby/gems/1.8/gems/activerecord- 1.15.3/lib/active_record/base.rb:1505:in
initialize_without_callbacks’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:225:in initialize' #{RAILS_ROOT}/app/controllers/public_controller.rb:39:in
new’
#{RAILS_ROOT}/app/controllers/public_controller.rb:39:in `create’
Request
Parameters: {“commit”=>“Create”, “album”=>{“artist”=>“Jimi Hendrix”, “title”=>“Electric Lady Land”, “release_date(1i)”=>“1969”, “release_date(2i)”=>“12”, “release_date(3i)”=>“31”, “genre”=>“Rock”, “release_date(4i)”=>“00”, “release_date(5i)”=>“00”}}
Here is my version information:
About your application’s environment Ruby version 1.8.6 (i386-mswin32) RubyGems version 0.9.2
Rails version 1.2.3
Active Record version 1.15.3 Action Pack version 1.13.3 Action Web Service version 1.2.3 Action Mailer version 1.3.3 Active Support version 1.4.2 Application root C:/railz/music_library
Environment development Database adapter mysql Database schema version 0
Controller Code:
def new
@album = Album.new
@album.title
= ‘Electric Lady Land’ end
View Code:
<%= start_form_tag(:action => 'create') %>
Title: <%= text_field(:album, :title) %><br />
Artist: <%= text_field(:album, :artist) %><br />
Genre: <%= text_field(:album, :genre) %><br />
Release Date: <%= datetime_select(:album, :release_date, :start_year => 1960) %><br />
<br />
<%= submit_tag("Create") %>
<%= end_form_tag %>
Thank you all for your time, and my apologies if this is ridiculously newbie-ish.