lib/markable/acts_as_markable.rb in markable-0.1.0 vs lib/markable/acts_as_markable.rb in markable-0.1.1
- old
+ new
@@ -25,10 +25,10 @@
:allowed_markers => markers
}
end
class_eval do
- has_many :markable_marks, :class_name => 'Markable::Mark', :as => :markable
+ has_many :markable_marks, :class_name => 'Markable::Mark', :as => :markable, :dependent => :delete_all
include Markable::ActsAsMarkable::MarkableInstanceMethods
def self.marked_as(mark, options = {})
if options[:by].present?
result = self.joins(:markable_marks).where( :marks => {