Permalink
Browse files

Remove an unused argument

  • Loading branch information...
1 parent b29e893 commit 386b7bfd9d78a6d8c8bc7cc4a310df806ad0ba57 Carl Lerche committed Apr 3, 2010
Showing with 1 addition and 2 deletions.
  1. +1 −2 activerecord/lib/active_record/associations.rb
@@ -1493,14 +1493,13 @@ def add_touch_callbacks(reflection, touch_attribute)
# The +extra_conditions+ parameter, which is not used within the main
# Active Record codebase, is meant to allow plugins to define extra
# finder conditions.
- def configure_dependency_for_has_many(reflection, extra_conditions = nil)
+ def configure_dependency_for_has_many(reflection)
if reflection.options.include?(:dependent)
# Add polymorphic type if the :as option is present
dependent_conditions = []
dependent_conditions << "#{reflection.primary_key_name} = \#{record.#{reflection.name}.send(:owner_quoted_id)}"
dependent_conditions << "#{reflection.options[:as]}_type = '#{base_class.name}'" if reflection.options[:as]
dependent_conditions << sanitize_sql(reflection.options[:conditions], reflection.table_name) if reflection.options[:conditions]
- dependent_conditions << extra_conditions if extra_conditions
dependent_conditions = dependent_conditions.collect {|where| "(#{where})" }.join(" AND ")
dependent_conditions = dependent_conditions.gsub('@', '\@')
case reflection.options[:dependent]

0 comments on commit 386b7bf

Please sign in to comment.