mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Nested attributes and in-memory changed values #first and #[] behaviour consistency fix
This commit is contained in:
committed by
Aaron Patterson
parent
2884482c34
commit
e92c2ffd8e
@@ -518,7 +518,7 @@ module ActiveRecord
|
||||
|
||||
def fetch_first_or_last_using_find?(args)
|
||||
(args.first.kind_of?(Hash) && !args.first.empty?) || !(loaded? || @owner.new_record? || @reflection.options[:finder_sql] ||
|
||||
@target.any? { |record| record.new_record? } || args.first.kind_of?(Integer))
|
||||
@target.any? { |record| record.new_record? || record.changed? } || args.first.kind_of?(Integer))
|
||||
end
|
||||
|
||||
def include_in_memory?(record)
|
||||
|
||||
Reference in New Issue
Block a user