Phillip You are a genius
That worked a treat. Thanks.
I'll have look up "HashWithIndifferentAccess" and "merge!" to see what they do.
Thanks for the help. Much appreciated.
Cheers, Alex
Phillip Koebbe wrote:
Phillip You are a genius
That worked a treat. Thanks.
I'll have look up "HashWithIndifferentAccess" and "merge!" to see what they do.
Thanks for the help. Much appreciated.
Cheers, Alex
Phillip Koebbe wrote:
Phillip You are a genius
Um, actually, I just had a memory of having to do the same thing two weeks ago
That worked a treat. Thanks.
Wonderful!
I'll have look up "HashWithIndifferentAccess" and "merge!" to see what they do.
I'll save you a little bit of digging. HashWithIndifferentAccess is a class that Rails provides which allows you to access a value by using either a string key or symbol key. So params[:id] is the same as params['id'] because params is a HashWithIndifferentAccess. That's the bear that I wrestled with a couple of weeks ago (thanks again ///ark!), but once I learned about HWIA, all is much better.
As for merge!, take a look at
and scroll down the Class list (in the middle) to Hash.
Peace, Phillip