Skip to content

Instantly share code, notes, and snippets.

@house9
Created October 22, 2011 16:44
Show Gist options
  • Save house9/1306191 to your computer and use it in GitHub Desktop.
Save house9/1306191 to your computer and use it in GitHub Desktop.
# http://railsforum.com/viewtopic.php?id=969
def strip_params
params.each {|key, value| params[key] = value.strip if value.respond_to?(strip)}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment