Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 19 lines (13 sloc) 0.471 kB
ed0ef1c Remove unnecessary condition from plugin initializer
mislav authored
1 require 'will_paginate'
005b871 @mislav enable will_paginate to load as a plugin
authored
2
3 # This is all duplication of what Railtie does, but is necessary because
4 # the initializer defined by the Railtie won't ever run when loaded as plugin.
5
6 if defined? ActiveRecord::Base
4d260bc @mislav mix in Active Record/Action View directly on `require`
authored
7 require 'will_paginate/active_record'
005b871 @mislav enable will_paginate to load as a plugin
authored
8 end
9
10 if defined? ActionController::Base
11 WillPaginate::Railtie.setup_actioncontroller
12 end
13
14 if defined? ActionView::Base
4d260bc @mislav mix in Active Record/Action View directly on `require`
authored
15 require 'will_paginate/view_helpers/action_view'
005b871 @mislav enable will_paginate to load as a plugin
authored
16 end
17
18 WillPaginate::Railtie.add_locale_path config
Something went wrong with that request. Please try again.