Sha256: 06ec6f97046c8d68f727f3fdce85eb886ec840b7068e022ccb29e5c926d3c332

Contents?: true

Size: 755 Bytes

Versions: 7

Compression:

Stored size: 755 Bytes

Contents

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

    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

7 entries across 7 versions & 1 rubygems

Version Path
draper-1.0.0 spec/support/models/namespaced_product.rb
draper-1.0.0.beta6 spec/support/models/namespaced_product.rb
draper-1.0.0.beta5 spec/support/models/namespaced_product.rb
draper-1.0.0.beta4 spec/support/models/namespaced_product.rb
draper-1.0.0.beta3 spec/support/models/namespaced_product.rb
draper-1.0.0.beta2 spec/support/models/namespaced_product.rb
draper-1.0.0.beta1 spec/support/models/namespaced_product.rb