I\'m trying to achieve URLs like this in Rails:
http://localhost/posts/1234/post-slug-name
with both ID and slug name instead of either
Use friendly_id. It has one nice feature: you can update your url without breaking the old one.
Generating view url isn't working for me. I just added a small method in the model
def to_param self.friendly_id end