Sha256: e769960394f05393aee59842b0753fd61d5729f83f0d2b873e63269eb0cf2a9a

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 Bytes

Contents

class Product < ActiveRecord::Base
  include Draper::ModelSupport

  def self.first
    @@first ||= Product.new
  end

  def self.last
    @@last ||= Product.new
  end
  
  def self.all
    [Product.new, Product.new]
  end

  def self.scoped
    [Product.new]
  end

  def self.model_name
    "Product"
  end

  def self.find(id)
    return Product.new
  end
  
  def self.sample_class_method
    "sample class method"
  end
  
  def hello_world
    "Hello, World"
  end
  
  def goodnight_moon
    "Goodnight, Moon"
  end
  
  def title
    "Sample Title"
  end
  
  def block
    yield
  end

  def self.reflect_on_association(association_symbol)
    OpenStruct.new(:klass => self)
  end

  def similar_products
    [Product.new, Product.new]
  end

  def previous_version
    Product.new
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
draper-0.10.0 spec/support/samples/product.rb