Permalink
Browse files

load will_paginate view helpers even if ActiveRecord is not loaded

  • Loading branch information...
1 parent 8888651 commit fce2e9eb9c207d124630836459b3a5aa9b858d68 @gcirne gcirne committed with mislav Apr 21, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/will_paginate.rb
View
5 lib/will_paginate.rb
@@ -73,6 +73,7 @@ def self.warn(message, callstack = caller)
end
end
-if defined?(Rails) and defined?(ActiveRecord) and defined?(ActionController)
- WillPaginate.enable
+if defined? Rails
+ WillPaginate.enable_activerecord if defined? ActiveRecord
+ WillPaginate.enable_actionpack if defined? ActionController
end

0 comments on commit fce2e9e

Please sign in to comment.