dom_id(Post.find(12)) # => "post_23" dom_id(Post.new) # => "new_post"
dom_id(Post.find(23), :edit) # => "edit_post_23" dom_id(Post.new, :custom) # => "custom_post"
From us to your inbox weekly.