require "active_record"

# Attributes
# box_number
# description
# state
# series_number
# current_location

module TrackableItems
  def self.included(base)
    base.extend(ClassMethods)
  end

  module ClassMethods
    def set_up_trackable_items(*args)
      options = args.last.is_a?(Hash) ? args.pop : Hash.new

      # don't allow multiple calls
      return if self.included_modules.include?(KeteTrackableItems::InstanceMethods)
      
      send :include, TrackableItems::InstanceMethods
      
      send :has_many, :shelf_locations
      # not sure if it has many/what about subitems?
      send :has_one, :organisations
    
    def description_for_tracked_item
      
    end
  
  end
  
  module InstanceMethods

  end
end
require "active_record"

# Attributes
# box_number
# description
# state
# series_number
# current_location

module TrackableItems
  def self.included(base)
    base.extend(ClassMethods)
  end

  module ClassMethods
    def set_up_trackable_items(*args)
      options = args.last.is_a?(Hash) ? args.pop : Hash.new

      # don't allow multiple calls
      return if self.included_modules.include?(TrackableItems::InstanceMethods)
      
      send :include, TrackableItems::InstanceMethods
      
      send :has_many, :shelf_locations
      # not sure if it has many/what about subitems?
      send :has_one, :organisations
    
    def description_for_tracked_item
      
    end
  
  end
  
  module InstanceMethods

  end
end
Remove kete working from module
Remove kete working from module

Signed-off-by: Chris Toynbee <9bf3774ab19e71b4502fac9bd506468044cb6bd6@gmail.com>
