forked from mislav/will_paginate
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable will_paginate to load as a plugin
- Loading branch information
Showing
2 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,18 @@ | ||
require 'will_paginate' | ||
|
||
# This is all duplication of what Railtie does, but is necessary because | ||
# the initializer defined by the Railtie won't ever run when loaded as plugin. | ||
|
||
if defined? ActiveRecord::Base | ||
WillPaginate::Railtie.setup_activerecord | ||
end | ||
|
||
if defined? ActionController::Base | ||
WillPaginate::Railtie.setup_actioncontroller | ||
end | ||
|
||
if defined? ActionView::Base | ||
WillPaginate::Railtie.setup_actionview | ||
end | ||
|
||
WillPaginate::Railtie.add_locale_path config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters