Method: ActiveRecord::Relation#scope_for_create
- Defined in:
- activerecord/lib/active_record/relation.rb
#scope_for_create ⇒ Object
1231 1232 1233 1234 1235 |
# File 'activerecord/lib/active_record/relation.rb', line 1231 def scope_for_create hash = where_clause.to_h(model.table_name, equality_only: true) create_with_value.each { |k, v| hash[k.to_s] = v } unless create_with_value.empty? hash end |