diff options
author | Alexey Vakhov <vakhov@gmail.com> | 2012-04-05 12:07:30 +0600 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2012-04-05 12:07:30 +0600 |
commit | 0693bc2c2a3a98f75d0ddc7c57b731d2f13130b7 (patch) | |
tree | 1c121cade5f1d13d5ee74b73ef234a53b5ae947c /actionpack/lib/action_controller | |
parent | c91d07f57c22fb926b312561bf391fe67a28924c (diff) | |
download | rails-0693bc2c2a3a98f75d0ddc7c57b731d2f13130b7.tar.gz rails-0693bc2c2a3a98f75d0ddc7c57b731d2f13130b7.tar.bz2 rails-0693bc2c2a3a98f75d0ddc7c57b731d2f13130b7.zip |
Add AC record identifier example with not-persisted object
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/record_identifier.rb | 1 |
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}" |