Forum: Rails-core (closed, excessive spam) broken dom_id??

Posted by Andrew Kaspick (akaspick)
on 2008-06-13 06:48
(Received via mailing list)
I originally posted this in the normal rails group, but no replies...

In the docs for dom_id, this is given as an example...

dom_id(Post.new(:id => 45)) # => "post_45"

This doesn't work and I don't see how it's supposed to work.  :id is a
protected attribute, meaning it will be nil.

The example above should always return "new_post", not "post_45".

Am I missing something here or is this just some bad documentation that
got in to Rails?  I don't even see this as an example in the test cases.

Thanks,
Andrew
Posted by DHH (Guest)
on 2008-06-13 16:26
(Received via mailing list)
Looks like a bad piece of documentation. Please do fix on docrails.
This topic is locked and can not be replied to.