Flowdock
method

dependent_conditions

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveRecord::Reflection::AssociationReflection

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

dependent_conditions(record, base_class, extra_conditions) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/reflection.rb, line 300
      def dependent_conditions(record, base_class, extra_conditions)
        dependent_conditions = []
        dependent_conditions << "#{primary_key_name} = #{record.send(name).send(:owner_quoted_id)}"
        dependent_conditions << "#{options[:as]}_type = '#{base_class.name}'" if options[:as]
        dependent_conditions << klass.send(:sanitize_sql, options[:conditions]) if options[:conditions]
        dependent_conditions << extra_conditions if extra_conditions
        dependent_conditions = dependent_conditions.collect {|where| "(#{where})" }.join(" AND ")
        dependent_conditions = dependent_conditions.gsub('@', '\@')
        dependent_conditions
      end
Register or log in to add new notes.