This is a much more subtle SQL injection.
I believe the takeaway is that too much magic is a bad thing when it obscures the underlying behavior.
Post.find_by_id( ) accepts an argument. Here are some normal assumptions:
1. It might only take a number
2. The method might coerce it to a string or integer for you
3. The method might not coerce it.
4. The method might throw an error if it isn't an int or the object isn't found.
5. The parameter is treated like a hash and used for lookups.
This last one seems a bit too much magic to me. I wouldn't even guess that last one as normal, expected behavior.