On Aug 8, 2015, at 12:32 AM, Panayotis Matsinopoulos <
pana...@matsinopoulos.gr> wrote:
>
> Hmmmmm. Yes, It works indeed as you say.Thanks for that. To tell you truth, I tried that from the beginning, but it didn't work for me. But probably was
> error on the client side not sending the correct request, rather than on the server side.
In the future when you have a problem like that, first thing to do is log params.inspect and take a look. Maybe you'll see how the params are, and understand that you had a mistake in the way you were accessing them. If not, then log the request body, and see how RoR parses a request body into params, and understand that maybe you were expecting the wrong thing there, or if not, that the request body is not correct.
When you work with complex forms, it's not at all uncommon to not find data where you expect it in the params when you're first developing. So getting comfortable with debugging those issues is a good thing ;-)
--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice