mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
adding slugs to schools and categories
This commit is contained in:
parent
683fc31c5d
commit
1db61cd3e5
13 changed files with 42 additions and 12 deletions
|
|
@ -9,6 +9,9 @@ class Category < ApplicationRecord
|
|||
|
||||
scope :for_parent, -> (category=nil) { where(parent_category_id: category.try(:id)) }
|
||||
|
||||
include FriendlyId
|
||||
friendly_id :name, :use => [:slugged]
|
||||
|
||||
def path
|
||||
p = self
|
||||
items = [p]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue