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

Version Path
pixelearth-3.2.4 lib/required/active_record.rb
pixelearth-3.2.2 lib/required/active_record.rb
pixelearth-0.0.7 lib/required/active_record.rb
pixelearth-0.0.6 lib/required/active_record.rb
pixelearth-0.0.5 lib/required/active_record.rb
pixelearth-0.0.4 lib/required/active_record.rb
pixelearth-0.0.3 lib/required/active_record.rb
pixelearth-0.0.2 lib/required/active_record.rb