<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,8 +1,8 @@
 begin
-  require &quot;active_support/multibyte&quot;
+  $KCODE = 'u'
+  require 'rubygems'
+  require 'active_support'
 rescue LoadError
-  require &quot;rubygems&quot;
-  require &quot;active_support/multibyte&quot;
 end
 module Railslove
   module Plugins
@@ -66,19 +66,6 @@ You can use for example User.find_by_param(params[:id], args) to find the user b
       end
       
       module SingletonMethods
-  
-        # borrowed from http://github.com/henrik/slugalizer ;) thanks henrik http://github.com/henrik
-        def escape_permalink(str, separator='-')
-          return &quot;&quot; if str.blank? # hack if the str/attribute is nil/blank
-          re_separator = Regexp.escape(separator)
-          result = ActiveSupport::Multibyte::Handlers::UTF8Handler.normalize(str.to_s, :kd)
-          result.gsub!(/[^\x00-\x7F]+/, '') # Remove non-ASCII (e.g. diacritics).
-          result.gsub!(/[^a-z0-9\-_\+]+/i, separator) # Turn non-slug chars into the separator.
-          result.gsub!(/#{re_separator}{2,}/, separator) # No more than one of the separator in a row.
-          result.gsub!(/^#{re_separator}|#{re_separator}$/, '') # Remove leading/trailing separator.
-          result.downcase!
-          result
-        end
           
 =begin rdoc
 
@@ -146,7 +133,7 @@ Accepts an options hash as a second parameter which is passed on to the rails fi
         end
         
         def escape_permalink(value)
-          &quot;#{value.respond_to?(&quot;parameterize&quot;) ? value.parameterize.to_s : self.class.escape_permalink(value)}&quot;
+          value.to_s.parameterize
         end
         
         #this escapes and truncates a value.</diff>
      <filename>lib/find_by_param.rb</filename>
    </modified>
    <modified>
      <diff>@@ -70,8 +70,8 @@ class FindByParamTest &lt; Test::Unit::TestCase
     assert_equal nil, Post.find_by_param(&quot;isnothere&quot;)
   end
   
-  def test_escape_should_strip_special_chars
-    assert_equal &quot;+-he-l-l-o-ni-ce-duaode&quot;, Post.escape(&quot;+*(he/=&amp;l$l&lt;o !ni^?ce-`du&#228;&#246;de;:@&quot;)
+  def test_should_strip_special_chars
+    assert_equal &quot;+-he-l-l-o-ni-ce-duaode&quot;, Post.new.send(:escape_permalink, &quot;+*(he/=&amp;l$l&lt;o !ni^?ce-`du&#228;&#246;de;:@&quot;)
   end
   
   def test_does_not_leak_options</diff>
      <filename>test/find_by_param_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@ require 'test/unit'
 require 'rubygems'
 require 'active_record'
 require 'active_support'
+#require 'active_support/multibyte'
 require 'find_by_param'
 class ActiveRecord::Base
   class_inheritable_accessor :permalink_options</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f1534e9817432b194b7e53db6683f51d2c2e35a7</id>
    </parent>
  </parents>
  <author>
    <name>Michael Bumann</name>
    <email>michael@railslove.com</email>
  </author>
  <url>http://github.com/bumi/find_by_param/commit/85b437c067cd1e91fca47a3690449ce8467685ae</url>
  <id>85b437c067cd1e91fca47a3690449ce8467685ae</id>
  <committed-date>2009-08-09T04:48:53-07:00</committed-date>
  <authored-date>2009-08-09T04:48:53-07:00</authored-date>
  <message>drop support for old rails versions and rely on rails' String#parameterize extension</message>
  <tree>a03623ef1f98e344a2ec6839ea9c26a73ea7ff07</tree>
  <committer>
    <name>Michael Bumann</name>
    <email>michael@railslove.com</email>
  </committer>
</commit>
