Sha256: 08738e828b0fa9a1f96f57138fde4c3d2c357bc854c23b34c60ff7909ff381f4

Contents?: true

Size: 156 Bytes

Versions: 5

Compression:

Stored size: 156 Bytes

Contents

class Product < ActiveRecord::Base
  belongs_to :category

  def self.find(*args)
    find_by_slug(*args) || super
  end

  def to_param
    slug
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gretel-trails-0.0.5 test/dummy/app/models/product.rb
gretel-trails-0.0.4 test/dummy/app/models/product.rb
gretel-trails-0.0.3 test/dummy/app/models/product.rb
gretel-trails-0.0.2 test/dummy/app/models/product.rb
gretel-trails-0.0.1 test/dummy/app/models/product.rb