Skip to content

Commit

Permalink
load will_paginate view helpers even if ActiveRecord is not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
gcirne authored and mislav committed May 9, 2009
1 parent 8888651 commit fce2e9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/will_paginate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.