lib/faceted/collector.rb in faceted-0.6.4 vs lib/faceted/collector.rb in faceted-0.7.0
- old
+ new
@@ -1,17 +1,17 @@
module Faceted
module Collector
- require 'json'
- require 'active_support/core_ext/hash'
+ include Faceted::Model
def self.included(base)
base.extend ActiveModel::Naming
base.send(:attr_accessor, :errors)
base.send(:attr_accessor, :success)
base.extend ClassMethods
+ base.extend Faceted::Model::ModelClassMethods
end
# Class methods ===========================================================
module ClassMethods
@@ -27,13 +27,9 @@
self.send(:attr_accessor, args[:find_by])
end
def collected_class
@collects
- end
-
- def scope
- parent.to_s == "Object" ? "::" : "#{parent.to_s}::"
end
end
# Instance methods =========================================================
\ No newline at end of file