Skip to content

Instantly share code, notes, and snippets.

@joefiorini
Created October 30, 2008 04:43
Show Gist options
  • Save joefiorini/20916 to your computer and use it in GitHub Desktop.
Save joefiorini/20916 to your computer and use it in GitHub Desktop.
class << params_hash
def to_params
inject([]) do |a,v|
if v[1]
a << "'#{v[0].to_s}=#{v[1]}'"
end
a
end.join("&")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment