Permalink
Browse files

Remove unused local variables

  • Loading branch information...
John Firebaugh authored and jeremyevans committed Mar 1, 2011
1 parent f65955b commit 4dc394a56b71e99531c39a1f572ab1ae3eae2711
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/sequel/model/associations.rb
@@ -782,8 +782,7 @@ def def_many_to_many(opts)
opts[:graph_join_table_join_type] ||= opts[:graph_join_type]
opts[:after_load].unshift(:array_uniq!) if opts[:uniq]
opts[:dataset] ||= proc{opts.associated_class.inner_join(join_table, rcks.zip(opts.right_primary_keys) + lcks.zip(lcpks.map{|k| send(k)}))}
- database = db
-
+
opts[:eager_loader] ||= proc do |eo|
h = eo[:key_hash][left_pk]
eo[:rows].each{|object| object.associations[name] = []}
@@ -1366,7 +1365,6 @@ def ungraphed
# r :: association reflection for the current association
# *associations :: any associations dependent on this one
def eager_graph_association(ds, model, ta, requirements, r, *associations)
- klass = r.associated_class
assoc_name = r[:name]
assoc_table_alias = ds.unused_table_alias(assoc_name)
ds = r[:eager_grapher].call(ds, assoc_table_alias, ta)

0 comments on commit 4dc394a

Please sign in to comment.