Skip to content

Commit 5ae1c5a

Browse files
committed
[skip ci] Document id_value method
Adds documention for ActiveRecord::ModelSchema#id_value as a utility when using composite primary keys.
1 parent 362134b commit 5ae1c5a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

activerecord/lib/active_record/model_schema.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ module ActiveRecord
66
module ModelSchema
77
extend ActiveSupport::Concern
88

9+
##
10+
# :method: id_value
11+
# :call-seq: id_valiue
12+
#
13+
# Returns the underlying column value for a column named "id". Useful when defining
14+
# a composite primary key including an "id" column so that the value is readable.
15+
916
##
1017
# :singleton-method: primary_key_prefix_type
1118
# :call-seq: primary_key_prefix_type

0 commit comments

Comments
 (0)