0
@@ -123,6 +123,35 @@ only for languages that use some variant of the Roman alphabet.
0
You must install the "unicode" and "iconv" to use this feature.
0
+h3. This is all too complicated. Why not just override to_param to return the
0
+id followed by a dasherized string?
0
+This creates URL's like the following:
0
+ http://www.example.org/profiles/12-joe
0
+Which works great. But at times you may prefer not having the id in the URL.
0
+ http://www.example.org/profiles/joe
0
+Note that if you are using the to_param trick for URL's, you should check to
0
+make sure your URL's are being accessed with the most up-to-date slug, because
0
+the following two URL's will point to the same content:
0
+ http://www.example.org/posts/12-i-love-friend-id
0
+ http://www.example.org/profiles/12-friendly-id-sucks
0
+In these cases it's convenient to have a before_filter in your controller
0
+that does something like this:
0
+ def ensure_current_url
0
+ if request.headers['REQUEST_URI'] != post_path(@post)
0
+ redirect_to @post, :status => :moved_permanently
0
Git repository: git://github.com/norman/friendly_id.git
0
@@ -156,33 +185,6 @@ The default is to remove dead slugs older than 45 days, but is configurable:
0
rake:friendly_id:remove_old_slugs MODEL=MyModelName DAYS=60
0
-h2. This is all too complicated. Why not just override to_param to return the
0
-id followed by a dasherized string?
0
-This create URL's like the following:
0
- http://www.example.org/profiles/12-joe
0
-Which works great. But at times you may prefer not having the id in the URL.
0
- http://www.example.org/profiles/joe
0
-Note that if you are using the to_param trick for URL's, you should check to
0
-make sure your URL's are being accessed with the most up-to-date slug, because
0
-the following two URL's will point to the same content:
0
- http://www.example.org/posts/12-i-love-friend-id
0
- http://www.example.org/profiles/12-friendly-id-sucks
0
-In these cases it's convenient to have a before_filter in your controller
0
-that does something like this:
0
- def ensure_current_url
0
- if request.headers['REQUEST_URI'] != post_path(@post)
0
- redirect_to @post, :status => :moved_permanently
0
Please report them on "Lighthouse":http://randomba.lighthouseapp.com/projects/14675-friendly_id.