Topic: Can't mass-assign protected attributes: 0, 1, 2

Hey there,I've got a long associative javascript array which i want to save through my controller(I save them in a session first). However i get the error stated in the title. I know what this error means, but i have no fix for how to do it correctly. Since the 0, 1, 2 are they keys from my assoc array and not the title and latlng that are allowed attributes.Can anyone help me out?My assoc array{

Re: Can't mass-assign protected attributes: 0, 1, 2

Can you re-post your code. It got truncated. Use code tags http://railsforum.com/help.php?section=bbcode

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Can't mass-assign protected attributes: 0, 1, 2

I've figured the issue out after some struggling. I changed my top key to triplocations_attributes and managed to save my trip and the triplocations in one go smile