Sha256: 82cd7450bbbb23cd3ccbe8827b758a3006c4297754ececfcca6326d1621a6f04
Contents?: true
Size: 174 Bytes
Versions: 8
Compression:
Stored size: 174 Bytes
Contents
class ActiveRecord::Base def self.uses_slug(attrib = :name) define_method(:to_param) do "#{self.id}-#{self.send(attrib).parameterize}" end end end
Version data entries
8 entries across 8 versions & 1 rubygems