mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Nested attributes and in-memory changed values #first and #[] behaviour consistency fix
This commit is contained in:
parent
2884482c34
commit
e92c2ffd8e
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue