lib/bullet/association.rb in bullet-1.7.6 vs lib/bullet/association.rb in bullet-2.0.0.beta.1
- old
+ new
@@ -278,12 +278,12 @@
# e.g. { [<Post id:1>, <Post id:2>] => [:comments, :user] }
def eager_loadings
@@eager_loadings ||= {}
end
- VENDOR_ROOT = File.join(RAILS_ROOT, 'vendor')
+ VENDOR_ROOT = File.join(Rails.root, 'vendor')
def caller_in_project
- callers << caller.select {|c| c =~ /#{RAILS_ROOT}/}.reject {|c| c =~ /#{VENDOR_ROOT}/}
+ callers << caller.select {|c| c =~ /#{Rails.root}/}.reject {|c| c =~ /#{VENDOR_ROOT}/}
callers.uniq!
end
def callers
@@callers ||= []