lib/ninja_model/identity.rb in ninja-model-0.8.1 vs lib/ninja_model/identity.rb in ninja-model-0.9.0
- old
+ new
@@ -1,12 +1,14 @@
module NinjaModel
- class Base
- class_attribute :primary_key
- self.primary_key = :id
- undef_method(:id) if method_defined?(:id)
- end
-
module Identity
+ extend ActiveSupport::Concern
+
+ included do
+ class_attribute :primary_key
+ self.primary_key = :id
+ undef_method(:id) if method_defined?(:id)
+ end
+
def to_model
self
end
def to_param