Alex Nikolsky
Alex Nikolsky

Reputation: 2179

How to make date-like URL when showing records in Rails?

How can I get my records to be accessed in the following manner

enter image description here

instead of typical blog/:id fashion?

Upvotes: 1

Views: 74

Answers (1)

Mihail Petkov
Mihail Petkov

Reputation: 1545

You can use friendly-id gem. More info about it in GitHub

Tutorial in railscasts: http://railscasts.com/episodes/314-pretty-urls-with-friendlyid?view=asciicast

Upvotes: 1

Related Questions