Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permalinks with Ruby on Rails (dynamic routes)

I am currently developing a blogging system with Ruby on Rails and want the user to define his "permalinks" for static pages or blog posts, meaning:

the user should be able to set the page name, eg. "test-article" (that should be available via /posts/test-article) - how would I realize this in the rails applications and the routing file?

like image 948
z3cko Avatar asked Dec 17 '22 03:12

z3cko


1 Answers

for user-friendly permalinks you can use gem 'has_permalink'. For more details http://haspermalink.org

like image 86
vitthal-gaikwad Avatar answered Jan 01 '23 15:01

vitthal-gaikwad