@@ -340,10 +340,10 @@ class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
340340 # end
341341 #
342342 # By default, this will use the +uuid_generate_v4()+ function from the
343- # +uuid-ossp+ extension, which MUST be enabled on your databse. To enable
343+ # +uuid-ossp+ extension, which MUST be enabled on your database. To enable
344344 # the +uuid-ossp+ extension, you can use the +enable_extension+ method in your
345- # migrations To use a UUID primary key without +uuid-ossp+ enabled, you can
346- # set the +:default+ option to nil:
345+ # migrations. To use a UUID primary key without +uuid-ossp+ enabled, you can
346+ # set the +:default+ option to + nil+ :
347347 #
348348 # create_table :stuffs, id: false do |t|
349349 # t.primary_key :id, :uuid, default: nil
@@ -354,11 +354,10 @@ class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
354354 # You may also pass a different UUID generation function from +uuid-ossp+
355355 # or another library.
356356 #
357- # Note that setting the UUID primary key default value to +nil+
358- # will require you to assure that you always provide a UUID value
359- # before saving a record (as primary keys cannot be nil). This might be
360- # done via the SecureRandom.uuid method and a +before_save+ callback,
361- # for instance.
357+ # Note that setting the UUID primary key default value to +nil+ will
358+ # require you to assure that you always provide a UUID value before saving
359+ # a record (as primary keys cannot be +nil+). This might be done via the
360+ # +SecureRandom.uuid+ method and a +before_save+ callback, for instance.
362361 def primary_key ( name , type = :primary_key , options = { } )
363362 return super unless type == :uuid
364363 options [ :default ] = options . fetch ( :default , 'uuid_generate_v4()' )
0 commit comments