Skip to content

Remove warnings if user has explicitly defined paginator #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/api-pagination/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module ApiPagination
class Configuration
attr_reader :paginator

attr_accessor :total_header

attr_accessor :per_page_header
Expand All @@ -13,7 +11,10 @@ def configure(&block)
def initialize
@total_header = 'Total'
@per_page_header = 'Per-Page'
set_paginator
end

def paginator
@paginator || set_paginator
end

def paginator=(paginator)
Expand Down Expand Up @@ -67,6 +68,8 @@ def set_paginator
gem 'will_paginate'

WARNING

@paginator
end

def use_kaminari
Expand Down