aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/record_identifier.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/record_identifier.rb')
-rw-r--r--actionpack/lib/action_controller/record_identifier.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/record_identifier.rb b/actionpack/lib/action_controller/record_identifier.rb
index 18dda978b3..5c40889f6b 100644
--- a/actionpack/lib/action_controller/record_identifier.rb
+++ b/actionpack/lib/action_controller/record_identifier.rb
@@ -53,6 +53,7 @@ module ActionController
# If you need to address multiple instances of the same class in the same view, you can prefix the dom_id:
#
# dom_id(Post.find(45), :edit) # => "edit_post_45"
+ # dom_id(Post.new, :custom) # => "custom_post"
def dom_id(record, prefix = nil)
if record_id = record_key_for_dom_id(record)
"#{dom_class(record, prefix)}#{JOIN}#{record_id}"