Sha256: 68bd272695b2c12fe2318927fdc6af7312fc479fdfbb086a95832844667c4b1a

Contents?: true

Size: 798 Bytes

Versions: 14

Compression:

Stored size: 798 Bytes

Contents

require './spec/support/samples/product'

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

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

    def self.last
      @@last ||= Namespace::Product.new
    end

    def self.all
      [Namespace::Product.new, Namespace::Product.new]
    end

    def self.scoped
      [Namespace::Product.new]
    end

    def self.model_name
      "Namespace::Product"
    end

    def self.find(id)
      return Namespace::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
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
draper-0.18.0 spec/support/samples/namespaced_product.rb
draper-0.17.0 spec/support/samples/namespaced_product.rb
draper-0.16.0 spec/support/samples/namespaced_product.rb
draper-0.15.0 spec/support/samples/namespaced_product.rb
draper-0.15.0rc1 spec/support/samples/namespaced_product.rb
draper-0.14.0 spec/support/samples/namespaced_product.rb
draper-0.12.3 spec/support/samples/namespaced_product.rb
draper-0.12.2 spec/support/samples/namespaced_product.rb
draper-0.13.0 spec/support/samples/namespaced_product.rb
draper-0.12.1 spec/support/samples/namespaced_product.rb
draper-0.12.0 spec/support/samples/namespaced_product.rb
draper-0.11.1 spec/support/samples/namespaced_product.rb
draper-0.11.0 spec/support/samples/namespaced_product.rb
draper-0.10.0 spec/support/samples/namespaced_product.rb