File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ def find_or_create_by!(attributes, &block)
182
182
find_by ( attributes ) || create! ( attributes , &block )
183
183
end
184
184
185
- # Attempts to create a record with the given attributes in a table that has a unique constraint
185
+ # Attempts to create a record with the given attributes in a table that has a unique database constraint
186
186
# on one or several of its columns. If a row already exists with one or several of these
187
187
# unique constraints, the exception such an insertion would normally raise is caught,
188
188
# and the existing record with those attributes is found using #find_by!.
@@ -193,7 +193,7 @@ def find_or_create_by!(attributes, &block)
193
193
#
194
194
# There are several drawbacks to #create_or_find_by, though:
195
195
#
196
- # * The underlying table must have the relevant columns defined with unique constraints.
196
+ # * The underlying table must have the relevant columns defined with unique database constraints.
197
197
# * A unique constraint violation may be triggered by only one, or at least less than all,
198
198
# of the given attributes. This means that the subsequent #find_by! may fail to find a
199
199
# matching record, which will then raise an <tt>ActiveRecord::RecordNotFound</tt> exception,
You can’t perform that action at this time.
0 commit comments