I want to remove the leading and training spaces for most of the resources in my rails application
For a new POST request, rails does the xml parsing and passes the params hash to the controller. Some of the parameters have leading and/or trailing whitespaces which are causing problems (e.g. new resources being created rather than using the old ones). I don't want to put the code in all the controllers to strip the whitespaces for different resources/params.
I did find the following pattern:
Is there another better approach to solve this? I was thinking of configuring controller xml parser to remove these whitespaces. Is that possible?
Thanks, -Rakesh