Sha256: 2057b972be5c1ebdaddd1fe64eaf3a376dab76459eaf97cb2463a24e9939a195
Contents?: true
Size: 293 Bytes
Versions: 7
Compression:
Stored size: 293 Bytes
Contents
# encoding: utf-8 module DataMapper module Aspects module Slug def self.included(base) base.property :slug, String, length: 75, unique: true def base.find_by_slug(slug) first(slug: slug, order: [:updated_at.desc]) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems