Permalink
Browse files

class_variable_set is a private method in 1.8.7.

  • Loading branch information...
1 parent 6323dd5 commit ed713042d810bb8eb73a2f58e06321c638117e52 @scryptmouse scryptmouse committed Jun 11, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/slim_scrooge/slim_scrooge.rb
@@ -4,7 +4,7 @@ module SlimScrooge
module FindBySql
def self.included(base)
ActiveRecord::Base.extend ClassMethods
- ClassMethods.class_variable_set(:@@slim_use_arel, (base.method(:find_by_sql).arity != 1))
+ ClassMethods.send :class_variable_set, :@@slim_use_arel, (base.method(:find_by_sql).arity != 1)
class << base
alias_method_chain :find_by_sql, :slim_scrooge
end
@@ -20,7 +20,7 @@ def find_by_sql_with_slim_scrooge(sql, binds = [])
else
callsite_key = SlimScrooge::Callsites.callsite_key(sql)
end
-
+
if SlimScrooge::Callsites.has_key?(callsite_key)
find_with_callsite_key(sql, callsite_key, binds)
elsif callsite = SlimScrooge::Callsites.create(sql, callsite_key, name) # new site that is scroogeable

0 comments on commit ed71304

Please sign in to comment.