11 lines
196 B
Ruby
11 lines
196 B
Ruby
|
module ActiveSupport::Inflector
|
||
|
def dehumanize(the_string)
|
||
|
the_string.gsub(' ', '_').downcase
|
||
|
end
|
||
|
end
|
||
|
|
||
|
class String
|
||
|
def dehumanize
|
||
|
ActiveSupport::Inflector.dehumanize(self)
|
||
|
end
|
||
|
end
|