Permalink
Browse files

remove unnecessary reader

  • Loading branch information...
1 parent 0aa6872 commit e20dd73df42d63b206d221e2258cc6dc7b1e6068 @tenderlove tenderlove committed Jul 23, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/lib/active_record/associations/builder/association.rb
View
8 activerecord/lib/active_record/associations/builder/association.rb
@@ -20,7 +20,7 @@ class << self
self.valid_options = [:class_name, :foreign_key, :validate]
self.extensions = []
- attr_reader :model, :name, :scope, :options, :reflection
+ attr_reader :model, :name, :scope, :options
def self.build(*args, &block)
new(*args, &block).build
@@ -54,11 +54,11 @@ def build
validate_options
define_accessors
configure_dependency if options[:dependent]
- @reflection = model.create_reflection(macro, name, scope, options, model)
+ reflection = model.create_reflection(macro, name, scope, options, model)
Association.extensions.each do |extension|
- extension.build @model, @reflection
+ extension.build @model, reflection
end
- @reflection
+ reflection
end
def macro

0 comments on commit e20dd73

Please sign in to comment.