Browse files

require activesupport, dont assume AR

  • Loading branch information...
1 parent 8c58b94 commit 6cc3953764fd20f6a0f2264659e82757a5708167 @eval committed Feb 2, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/sudo_attr_accessibility.rb
View
4 lib/sudo_attr_accessibility.rb
@@ -1,3 +1,5 @@
+require 'active_support'
+
module SudoAttrAccessibility
extend ActiveSupport::Concern
@@ -72,4 +74,4 @@ class << self
end
end
end
-ActiveRecord::Base.send(:include, SudoAttrAccessibility)
+ActiveRecord::Base.send(:include, SudoAttrAccessibility) if defined?(ActiveRecord)

0 comments on commit 6cc3953

Please sign in to comment.