Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/locomotive/core_ext.rb
Overview
String
Instance Method Summary collapse
-
#permalink(underscore = false) ⇒ Object
:nodoc.
- #permalink!(underscore = false) ⇒ Object (also: #parameterize!)
Instance Method Details
#permalink(underscore = false) ⇒ Object
:nodoc
7 8 9 10 |
# File 'lib/locomotive/core_ext.rb', line 7 def permalink(underscore = false) permalink = self.to_url underscore ? permalink.underscore : permalink end |
#permalink!(underscore = false) ⇒ Object Also known as: parameterize!
12 13 14 |
# File 'lib/locomotive/core_ext.rb', line 12 def permalink!(underscore = false) replace(self.permalink(underscore)) end |