diff --git a/lib/dehumanize.rb b/lib/dehumanize.rb index becdca7..faa520f 100644 --- a/lib/dehumanize.rb +++ b/lib/dehumanize.rb @@ -1,6 +1,6 @@ module ActiveSupport::Inflector - def dehumanize(the_string) - the_string.gsub(' ', '_').downcase + def dehumanize(string) + string.parameterize.underscore end end @@ -8,4 +8,4 @@ class String def dehumanize ActiveSupport::Inflector.dehumanize(self) end -end \ No newline at end of file +end