method
construct_finder_sql_for_association_limiting
construct_finder_sql_for_association_limiting(options)
private
Hide source
# File activerecord/lib/active_record/associations.rb, line 976 def construct_finder_sql_for_association_limiting(options) raise(ArgumentError, "Limited eager loads and conditions on the eager tables is incompatible") if include_eager_conditions?(options) sql = "SELECT #{primary_key} FROM #{table_name} " add_conditions!(sql, options[:conditions]) sql << "ORDER BY #{options[:order]} " if options[:order] add_limit!(sql, options) return sanitize_sql(sql) end