Class: Spree::Page
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Spree::Page
- Defined in:
- app/models/spree/page.rb
Instance Method Summary collapse
Instance Method Details
#remove_leading_slash_from_slug ⇒ Object
12 13 14 |
# File 'app/models/spree/page.rb', line 12 def remove_leading_slash_from_slug self.slug = slug[1..-1] if slug.start_with?('/') # ensure that slugs don't start with a slash end |