Skip to content

Commit 6f8b5f8

Browse files
authored
Adds documentation for the FixtureSet#identify when the identifier is a UUID
1 parent ece21c7 commit 6f8b5f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

activerecord/lib/active_record/fixtures.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,10 @@ class FixtureClassNotFound < ActiveRecord::ActiveRecordError # :nodoc:
400400
# monkey_id: <%= ActiveRecord::FixtureSet.identify(:reginald) %>
401401
# pirate_id: <%= ActiveRecord::FixtureSet.identify(:george) %>
402402
#
403+
# If the model uses UUID values for identifiers, add the `:uuid` argument:
404+
#
405+
# ActiveRecord::FixtureSet.identify(:boaty_mcboatface, :uuid)
406+
#
403407
# == Support for YAML defaults
404408
#
405409
# You can set and reuse defaults in your fixtures YAML file.

0 commit comments

Comments
 (0)