Module: Garage::PaginatingResponder

Included in:
AppResponder
Defined in:
lib/garage/paginating_responder.rb

Instance Method Summary collapse

Instance Method Details

#display(resource, *args) ⇒ Object



3
4
5
6
7
8
# File 'lib/garage/paginating_responder.rb', line 3

def display(resource, *args)
  if @options[:paginate]
    resource = paginate resource
  end
  super(resource, *args)
end

#max_per_page=(count) ⇒ Object



10
11
12
# File 'lib/garage/paginating_responder.rb', line 10

def max_per_page=(count)
  @max_per_page = count
end

#reveal_total!Object



14
15
16
# File 'lib/garage/paginating_responder.rb', line 14

def reveal_total!
  @options.delete(:hard_limit)
end