Guest User

Untitled

a guest
Jun 21st, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. I would like to register multiple parties at once and each party can have multiple sub_parties.
  2. With code above sub_parties are not created since they dont belogn to the correct hash when submitted to controller
  3.  
  4. here what i get in the controler params hash
  5.  
  6.  
  7. "parties"=>{"party"=>{"0"=>{"created_at"=>"2010-11-11 00:00:00 +0100", "game_id"=>""}, "1"=>{"created_at"=>"2010-11-11 00:00:00 +0100", "game_id"=>""}, "2"=>{"created_at"=>"2010-11-11 00:00:00 +0100", "game_id"=>""}, "sub_parties_attributes"=>{"0"=>{"created_at"=>"2010-11-11 00:00:00 +0100", "game_id"=>""}, "1"=>{"created_at"=>"2010-11-11 00:00:00 +0100", "game_id"=>""}}}}, "controller"=>"parties", "party"=>{"game"=>{"1289474165"=>""}}
  8.  
  9. the parties part is ok but sub_parties should be in each parties.
  10.  
  11. The app is a rails 2.3 apps not 3
  12.  
  13. If somebody can helps me with that
Add Comment
Please, Sign In to add comment