mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 16:18:42 -05:00
12 lines
281 B
Ruby
12 lines
281 B
Ruby
# encoding: utf-8
|
|
|
|
# Generates a slug. This is annoying because it's duplicating what the javascript
|
|
# does, but on the other hand slugs are never matched so it's okay if they differ
|
|
# a little.
|
|
module Slug
|
|
|
|
def self.for(string)
|
|
string.parameterize.gsub("_", "-")
|
|
end
|
|
|
|
end
|