kangkyu / post-resources

Share links with hashtag - Rails, Sass, Minitest
1 stars 0 forks source link

slug #3

Open kangkyu opened 9 years ago

kangkyu commented 9 years ago

If there's same post title, what should we do? Do we have to add a (slug) column?

kangkyu commented 9 years ago

There's another. what if url field different string but address the same? Currently when if you change its title then slug (which is url address) should be changed. Let's think if okay

kangkyu commented 9 years ago

add a new post, with the same name (name with same slug) then you cannot open (or edit) it! because you only find the first one with post_id (which is slug)

kangkyu commented 9 years ago

just tried create another post with different name (for different slug) for the website (with the same url I tried earlier) and it didn't work! because there's url uniqueness validation (my guess)

kangkyu commented 9 years ago

SUGGEST: how about... lock the name after adding each post, and the name of post has to be unique by validation