Permalink
Browse files

Autoload slug rather than requiring directly

Without this change, FriendlyId::Slug is not accessible from migrations
unless friendly_id/slug is explicitly required.

This should resolve issue #299.
  • Loading branch information...
norman committed Jun 19, 2012
1 parent 3db3b9c commit f93c4fcec8626eb1bbae5297e7c398d7482d6005
Showing with 1 addition and 2 deletions.
  1. +1 −0 lib/friendly_id.rb
  2. +0 −2 lib/friendly_id/history.rb
View
@@ -50,6 +50,7 @@ module FriendlyId
@mutex = Mutex.new
autoload :History, "friendly_id/history"
+ autoload :Slug, "friendly_id/slug"
autoload :SimpleI18n, "friendly_id/simple_i18n"
autoload :Reserved, "friendly_id/reserved"
autoload :Scoped, "friendly_id/scoped"
@@ -1,5 +1,3 @@
-require "friendly_id/slug"
-
module FriendlyId
=begin

0 comments on commit f93c4fc

Please sign in to comment.