Skip to content
Browse files

remove `valid_options` class method

  • Loading branch information...
1 parent 1dcd187 commit f7f422f1b3a5ee4eec90f71cb7ad3f5cdeb8957f @tenderlove tenderlove committed Aug 1, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 activerecord/lib/active_record/associations/builder/association.rb
View
7 activerecord/lib/active_record/associations/builder/association.rb
@@ -13,12 +13,11 @@
module ActiveRecord::Associations::Builder
class Association #:nodoc:
class << self
- attr_accessor :valid_options
attr_accessor :extensions
end
+ self.extensions = []
- self.valid_options = [:class_name, :foreign_key, :validate]
- self.extensions = []
+ VALID_OPTIONS = [:class_name, :foreign_key, :validate]
attr_reader :name, :scope, :options
@@ -61,7 +60,7 @@ def macro
end
def valid_options
- Association.valid_options + Association.extensions.flat_map(&:valid_options)
+ VALID_OPTIONS + Association.extensions.flat_map(&:valid_options)
end
def validate_options

0 comments on commit f7f422f

Please sign in to comment.
Something went wrong with that request. Please try again.