Getting parameters

Hi i got these parameter in the create controller
Parameters: {“commit”=>“Create Tip”,
“authenticity_token”=>“NCrD6MY1zIIBPMSm5sICH7SB+N/g/pc3MxYKnGOt5o0=”,
“utf8”=>“✓”, “tip”=>{“descripcion”=>“asdf”, “tip”=>“asdf”,
“tiptags_attributes”=>{“0”=>{“tags_id”=>“1”}}}}
so
i get these
@tip = Tip.new(params[:tip])

puts "Printing @tip[:tiptags_attributes] " =nil
puts @tip.attribute_names

descripcion
tip
nil

so how i can get  "tiptags_attributes"=>{"0"=>{"tags_id"=>"1"}

cause i want to change tags_id,

well, i try, try and try again i cant get it
params[:tip][:tiptags_attributes][:“0”][:tags_id]=1 whith the code i
can change the attribute

On Thu, Feb 10, 2011 at 3:59 PM, Lorenzo Brito M.

If its a nested attribute you dont need to do any of that

watch this

http://railscasts.com/episodes/196-nested-model-form-part-1