Hi everyone! I just started learning Ruby on Rails about a week ago for a school project, and can''t seem to find a solution for something. I have this inside the form inside of edit_albums.rhtml: <%= start_form_tag :action=>''proccess_edit_album'', :id=>@album.id %> .... Release Date: <%= datetime_select(:album, :release_date, :start_year => 1960) %><br /> .... and inside the controller: def edit_album @album = Album.find(params[''id'']) end def proccess_edit_album @album = Album.find(params[:id]) @album.update_attributes(params[:album]) if 1 redirect_to :action=> ''list_albums'' else render :action => ''edit_album'', :id=>params[''id''] end end but it gives me an error message, i dont get why, and i can''t seem to find a fix to it. Can anyone help me? I''ll appreciate it! ;) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
huard.elise-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-12 20:52 UTC
Re: help, 1 error(s) on assignment of multiparameter attributes
Hi Trukin, not an expert, but copy-pasting your error message might help. Elise On May 12, 10:36 pm, Trukin <tru...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi everyone! > > I just started learning Ruby on Rails about a week ago for a school > project, and can''t seem to find a solution for something. > > I have this inside the form inside of edit_albums.rhtml: > <%= start_form_tag :action=>''proccess_edit_album'', :id=>@album.id %> > .... > Release Date: <%= datetime_select(:album, :release_date, :start_year > => 1960) %><br /> > .... > > and inside the controller: > def edit_album > @album = Album.find(params[''id'']) > end > > def proccess_edit_album > @album = Album.find(params[:id]) > @album.update_attributes(params[:album]) > if 1 > redirect_to :action=> ''list_albums'' > else > render :action => ''edit_album'', :id=>params[''id''] > end > end > > but it gives me an error message, i dont get why, and i can''t seem to > find a fix to it. > > Can anyone help me? I''ll appreciate it! ;)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Trukin
2007-May-12 20:57 UTC
Re: help, 1 error(s) on assignment of multiparameter attributes
full trace: 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:1591:in `update_attributes'' #{RAILS_ROOT}/app/controllers/public_controller.rb:34:in `proccess_edit_album'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:1095:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:1095:in `perform_action_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:632:in `call_filter'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:619:in `perform_action_without_benchmark'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/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.3/lib/action_controller/ benchmarking.rb:66:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ rescue.rb:83:in `perform_action'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:430:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:430:in `process_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:624:in `process_without_session_management_support'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ session_management.rb:114:in `process'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:330:in `process'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb: 113:in `handle_dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/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.3/lib/webrick_server.rb:63:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/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.2/lib/active_support/ dependencies.rb:495:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:342:in `new_constants_in'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/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 -e:4:in `load'' -e:4 Request Parameters: {"commit"=>"Edit", "id"=>"1", "album"=>{"artist"=>"The Beatles", "title"=>"Abbey Road", "release_date(1i)"=>"1969", "release_date(2i)"=>"1", "release_date(3i)"=>"1", "genre"=>"Rock", "release_date(4i)"=>"12", "release_date(5i)"=>"00"}} --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Trukin
2007-May-12 20:58 UTC
Re: help, 1 error(s) on assignment of multiparameter attributes
ActiveRecord::MultiparameterAssignmentErrors in PublicController#proccess_edit_album 1 error(s) on assignment of multiparameter attributes read it wrong . --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Trukin
2007-May-12 21:18 UTC
Re: help, 1 error(s) on assignment of multiparameter attributes
i commented the html tag inside the template: Release Date: <%= datetime_select(:album, :release_date, :start_year => 1960) %><br /> to <!-- Release Date: <%datetime_select(:album, :release_date, :start_year => 1960) %><br /> -->and now it works fine, i think it has to do something with the array passed within the POST, or maybe something else, im not sure, if anyone knows why, can you please explain me? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Apparently Analagous Threads
- problem with AR and 'virtual' multiparameter attributes.
- 1 error(s) on assignment of multiparameter attributes
- 1 error(s) on assignment of multiparameter attributes - Very Strange
- newbie - HABTM problems writing to Join Table in SQL
- Form Dates and MultiparameterAssignmentErrors