Commit cff12983 by Martin Sereinig Committed by Ryan Bigg

FIX: reflections have been reworked in rails 4.1.2 - reflections is no longer…

FIX: reflections have been reworked in rails 4.1.2 - reflections is no longer available on activerecord objects, only on the class.

Fixes #143
parent 3e0eea14
...@@ -144,7 +144,7 @@ class ActiveRecord::Base ...@@ -144,7 +144,7 @@ class ActiveRecord::Base
alias :destroy! :destroy alias :destroy! :destroy
alias :delete! :delete alias :delete! :delete
def really_destroy! def really_destroy!
dependent_reflections = self.reflections.select do |name, reflection| dependent_reflections = self.class.reflections.select do |name, reflection|
reflection.options[:dependent] == :destroy reflection.options[:dependent] == :destroy
end end
if dependent_reflections.any? if dependent_reflections.any?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment