<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -35,6 +35,8 @@ module FriendlyId::SluggableClassMethods
 
     if result
       result.finder_slug_name = id_or_name
+    elsif id_or_name.to_i.to_s != id_or_name
+      raise ActiveRecord::RecordNotFound
     else
       result = find_one_without_friendly id_or_name, options
     end</diff>
      <filename>lib/friendly_id/sluggable_class_methods.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,6 +32,12 @@ class SluggedModelTest &lt; Test::Unit::TestCase
       assert Post.find(@post.id)
     end
 
+    should &quot;not be findable by its id if looking for something else&quot; do
+      assert_raises ActiveRecord::RecordNotFound do
+        Post.find(&quot;#{@post.id}-i-dont-exists&quot;)
+      end
+    end
+
     should &quot;generate slug text&quot; do
       post = Post.new :title =&gt; &quot;Test post&quot;, :content =&gt; &quot;Test content&quot;
       assert_not_nil @post.slug_text</diff>
      <filename>test/slugged_model_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e10333892d618ed981beaebbe631712e45f79dd3</id>
    </parent>
  </parents>
  <author>
    <name>Emilio Tagua</name>
    <email>miloops@gmail.com</email>
  </author>
  <url>http://github.com/kakra/friendly_id/commit/669be5e1ffb6edf50860588c5c4f26d4a13e1c8a</url>
  <id>669be5e1ffb6edf50860588c5c4f26d4a13e1c8a</id>
  <committed-date>2009-10-07T10:56:16-07:00</committed-date>
  <authored-date>2009-09-02T06:05:45-07:00</authored-date>
  <message>Fallback to AR::Base#find if the id is a string of numbers only.</message>
  <tree>f4b0e680c7affde5e329364b52a96244adf6fb88</tree>
  <committer>
    <name>Norman Clarke</name>
    <email>norman@eee.localdomain</email>
  </committer>
</commit>
