Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Respect previously defined VALID_FIND_OPTIONS

  • Loading branch information...
commit 186c25d7f43f389ba26f4472f438884f12ff5724 1 parent 10cc592
@methodmissing authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/optimizations/associations/macro.rb
View
3  lib/optimizations/associations/macro.rb
@@ -34,8 +34,9 @@ def self.extended( base )
eigen.instance_eval do
# Let :scrooge_callsite be a valid find option
#
+ valid_find_options = eigen::VALID_FIND_OPTIONS
remove_const(:VALID_FIND_OPTIONS)
- const_set( :VALID_FIND_OPTIONS, [ :conditions, :include, :joins, :limit, :offset, :order, :select, :readonly, :group, :having, :from, :lock, :scrooge_callsite ] )
+ const_set( :VALID_FIND_OPTIONS, valid_find_options << :scrooge_callsite )
end
eigen.alias_method_chain :find, :scrooge
eigen.alias_method_chain :find_every, :scrooge
Please sign in to comment.
Something went wrong with that request. Please try again.