1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00
draper/spec/support/models/namespaced_product.rb
Andrew Haines b8ca040653 Spec tidy-up
Removes some unneeded sample decorators and reorganises the samples
2012-11-09 01:02:54 +00:00

49 lines
755 B
Ruby

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