From 99e890f37ca3316fe3a4a48baa20f040fba3b941 Mon Sep 17 00:00:00 2001 From: Ken Collins Date: Wed, 7 Dec 2011 09:53:36 -0500 Subject: [PATCH] Removed some un-needed var passing. --- .../arish/associations/builder/grouped_association.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/grouped_scope/arish/associations/builder/grouped_association.rb b/lib/grouped_scope/arish/associations/builder/grouped_association.rb index f8be83f..de00efb 100644 --- a/lib/grouped_scope/arish/associations/builder/grouped_association.rb +++ b/lib/grouped_scope/arish/associations/builder/grouped_association.rb @@ -22,14 +22,14 @@ def build model.send(ungrouped_reflection.macro, grouped_name, grouped_options).tap do |grouped_reflection| grouped_reflection.grouped_scope = true model.grouped_reflections = model.grouped_reflections.merge(ungrouped_name => grouped_reflection) - define_grouped_scope_reader(model) + define_grouped_scope_reader end end private - def define_grouped_scope_reader(model) + def define_grouped_scope_reader model.send(:define_method, :group) do @group ||= GroupedScope::SelfGroupping.new(self) end