lib/reviewed/embeddable.rb in reviewed-0.2.2 vs lib/reviewed/embeddable.rb in reviewed-0.4.0
- old
+ new
@@ -48,9 +48,13 @@
end
module ClassMethods
attr_accessor :_embedded_many, :_embedded_one
+ def has_attachments
+ include Attachable
+ end
+
def has_many(name, opts={})
klass = Reviewed::Embeddable.embedded_class(name.to_s, opts[:class_name])
association = opts[:as] || name
_embedded_many << { association.to_s => klass }
end