Permalink
Browse files

added rails version check

  • Loading branch information...
1 parent 29a1354 commit 80bf5ee8e40a65da0cc70fcb4ecb00dc48ff7886 @bkoski committed Mar 16, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/slug.rb
View
@@ -3,4 +3,8 @@
if defined?(ActiveRecord)
ActiveRecord::Base.instance_eval { extend Slug::ClassMethods }
+end
+
+if defined?(Rails) && Rails.version.to_i < 3
+ raise "This version of slug requires Rails 3 or higher"
end

0 comments on commit 80bf5ee

Please sign in to comment.