<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,8 +8,8 @@ module FriendlyId
   module ClassMethods
 
     # Default options for friendly_id.
-    DEFAULT_FRIENDLY_ID_OPTIONS = {:method =&gt; nil, :use_slug =&gt; false, :max_length =&gt; 255, :strip_diacritics =&gt; false}.freeze
-    VALID_FRIENDLY_ID_KEYS = [:use_slug, :max_length, :strip_diacritics].freeze
+    DEFAULT_FRIENDLY_ID_OPTIONS = {:method =&gt; nil, :use_slug =&gt; false, :max_length =&gt; 255, :reserved =&gt; [], :strip_diacritics =&gt; false}.freeze
+    VALID_FRIENDLY_ID_KEYS = [:use_slug, :max_length, :reserved, :strip_diacritics].freeze
 
     # Set up an ActiveRecord model to use a friendly_id.
     #
@@ -20,6 +20,7 @@ module FriendlyId
     # * &lt;tt&gt;:use_slug&lt;/tt&gt; - Defaults to false. Use slugs when you want to use a non-unique text field for friendly ids.
     # * &lt;tt&gt;:max_length&lt;/tt&gt; - Defaults to 255. The maximum allowed length for a slug.
     # * &lt;tt&gt;:strip_diacritics&lt;/tt&gt; - Defaults to false. If true, it will remove accents, umlauts, etc. from western characters. You must have the unicode gem installed for this to work.
+    # * &lt;tt&gt;:reseved&lt;/tt&gt; - Array of words that are reserved and can't be used as slugs. If such a word is used, it will be treated the same as if that slug was already taken (numeric extension will be appended). Defaults to [].
     def has_friendly_id(column, options = {})
       options.assert_valid_keys VALID_FRIENDLY_ID_KEYS
       options = DEFAULT_FRIENDLY_ID_OPTIONS.merge(options).merge(:column =&gt; column)
@@ -228,8 +229,8 @@ module FriendlyId
     # Generate the text for the friendly id, ensuring no duplication.
     def generate_friendly_id
       slug_text = truncated_friendly_id_base
-
       count = Slug.count_matches slug_text, self.class.name, :all, :conditions =&gt; &quot;sluggable_id &lt;&gt; #{ id.to_i }&quot;
+      count += 1 if self.class.friendly_id_options[:reserved].include?(slug_text)
       count == 0 ? slug_text : generate_friendly_id_with_extension(slug_text, count)
     end
 </diff>
      <filename>lib/friendly_id.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,3 @@
 class Post &lt; ActiveRecord::Base
-  has_friendly_id :name, :use_slug =&gt; true
+  has_friendly_id :name, :use_slug =&gt; true, :reserved =&gt; ['new', 'recent']
 end</diff>
      <filename>test/fixtures/post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -175,4 +175,14 @@ class SluggableTest &lt; Test::Unit::TestCase
     end
   end
 
+  def test_should_not_use_reserved_slugs
+    post = Post.create!(:name =&gt; 'new')
+    assert_not_equal 'new', post.friendly_id
+  end
+  
+  def test_should_append_extension_to_reseved_slugs
+    post = Post.create!(:name =&gt; 'new')
+    assert_equal 'new-2', post.friendly_id
+  end
+
 end
\ No newline at end of file</diff>
      <filename>test/sluggable_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>89601d10ba528cdbae18688affe0314dfe0e5381</id>
    </parent>
  </parents>
  <author>
    <name>Adam Cig&#225;nek</name>
    <email>adam.ciganek@gmail.com</email>
  </author>
  <url>http://github.com/norman/friendly_id/commit/4c9617e3256e2ed8270d2b6ad4cd14bb3ab2eb1d</url>
  <id>4c9617e3256e2ed8270d2b6ad4cd14bb3ab2eb1d</id>
  <committed-date>2008-10-22T10:17:56-07:00</committed-date>
  <authored-date>2008-10-22T10:17:56-07:00</authored-date>
  <message>Added support for reseved slugs.</message>
  <tree>2245f924ccbe146e34a2055755adcf2f3a7a0fd5</tree>
  <committer>
    <name>Norman Clarke</name>
    <email>norman@randomba.org</email>
  </committer>
</commit>
