Sha256: 668c1628e964a7642a75b8cd84c81729a79bc22e968e4d64e368249fdefa0e4a

Contents?: true

Size: 864 Bytes

Versions: 3

Compression:

Stored size: 864 Bytes

Contents

module Kaminari
end

# load Rails/Railtie
begin
  require 'rails'
rescue LoadError
  #do nothing
end

$stderr.puts <<-EOC if !defined?(Rails) && !defined?(Sinatra) && !defined?(Grape)
warning: no framework detected.
would you check out if your Gemfile appropriately configured?
---- e.g. ----
when Rails:
    gem 'kaminari'

when Sinatra/Padrino:
    gem 'kaminari', :require => 'kaminari/sinatra'

when Grape:
    gem 'kaminari', :require => 'kaminari/grape'

EOC

# load Kaminari components
require 'kaminari/config'
require 'kaminari/helpers/action_view_extension'
require 'kaminari/helpers/paginator'
require 'kaminari/models/page_scope_methods'
require 'kaminari/models/configuration_methods'
require 'kaminari/hooks'

# if not using Railtie, call `Kaminari::Hooks.init` directly
if defined? Rails
  require 'kaminari/railtie'
  require 'kaminari/engine'
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/kaminari-0.14.1/lib/kaminari.rb
kaminari-0.14.1 lib/kaminari.rb
kaminari-0.14.0 lib/kaminari.rb