instance method
scope_for_create
Ruby on Rails 6.0.6
Since v3.0.20Signature
scope_for_create()
No documentation comment.
Source
# File activerecord/lib/active_record/relation.rb, line 673
def scope_for_create
hash = where_values_hash
hash.delete(klass.inheritance_column) if klass.finder_needs_type_condition?
create_with_value.each { |k, v| hash[k.to_s] = v } unless create_with_value.empty?
hash
end
Defined in activerecord/lib/active_record/relation.rb line 673
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Relation