This article was originally published on (to update, append or delete).
You use it like this:
dom_id(User) # => "new_user"
dom_id(User.find(42)) # => "user_42"
It is this last example I have issues with. As it exposes the primary id of that record. Depending on your app, you might not care, but when you run a (SaaS) business, this might be sensitive business information you don't want exposed.
So I created a little gem, called .
SOCIAL SHARE CARD GENERATOR