ace
ace

Reputation: 305

Display Custom URL path for better SEO - Rails 4

I have been looking around for some way to tweak routes.rb in a way that instead of routing page url's to numbers (ids) that may be not very good to page SEO, I would prefer to have event names on the tittle. Example:

At the moment I have this:

example.com/events/666

I should have this:

example.com/events/better-page-url-seo

The "better page url seo" is the attribute name associated with id "666".

Upvotes: 0

Views: 87

Answers (1)

bhanu
bhanu

Reputation: 2460

you can use the gem friendly_id. for more info look here

Upvotes: 3

Related Questions