Looks like a bad piece of documentation. Please do fix on docrails.
On Jun 12, 11:48 pm, "Andrew Kaspick" <akasp...@gmail.com>
wrote:> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---