Aura AuraSluggable

AuraSluggable

Implemented for models that are to be accessible via a slug URL.

Description

This automatically gives models the ability to be accessed via a slug URL (like /products/boots).

How to use

Use plugin :aura_sluggable.

class Book < Sequel::Model
  plugin :aura_sluggable

  # ...
end

Database setup

Add String :slug to your schema.

database.create_table :books do
  String :slug
  # ...
end

Class methods

Methods

  • path Returns the URL path.
  • slugify Returns a unique slug for the item.