Sha256: ca9e52154c8d7a519f0dacfcfaa1351ff0b70e036e087fddd97cdc498817f21b
Contents?: true
Size: 514 Bytes
Versions: 35
Compression:
Stored size: 514 Bytes
Contents
module Cms module Extensions module String def indent(n=0) (" "*n.to_i) + self end def markdown Cms.markdown? ? Markdown.new(self).to_html : "<strong>ERROR</strong>: Markdown Support Not Installed" end def to_slug gsub(/\W+/, ' ').strip.downcase.gsub(/\ +/, '-') end def pluralize(count=nil) count == 1 ? self : ActiveSupport::Inflector.pluralize(self) end end end end String.send(:include, Cms::Extensions::String)
Version data entries
35 entries across 35 versions & 11 rubygems