ruby/datamapper: Refactor class methods to module
- by DeSchleib
Hello,
i've the following code and tried the whole day to refactor the class methods to a sperate module to share the functionality with all of my model classes.
Code (http://pastie.org/974847):
class Merchant
include DataMapper::Resource
property :id, Serial
[...]
class << self
…