Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixing `record_key_for_dom_id` documentation.

The default implementation joins everything with '_' and not with '-'
  • Loading branch information
nhocki committed Sep 7, 2011
1 parent 4edf6ea commit 9821d98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/record_identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def dom_id(record, prefix = nil)
# This can be overwritten to customize the default generated string representation if desired.
# If you need to read back a key from a dom_id in order to query for the underlying database record,
# you should write a helper like 'person_record_from_dom_id' that will extract the key either based
# on the default implementation (which just joins all key attributes with '-') or on your own
# on the default implementation (which just joins all key attributes with '_') or on your own
# overwritten version of the method. By default, this implementation passes the key string through a
# method that replaces all characters that are invalid inside DOM ids, with valid ones. You need to
# make sure yourself that your dom ids are valid, in case you overwrite this method.
Expand Down

0 comments on commit 9821d98

Please sign in to comment.