Class: Account::CreditsController

Inherits:
BaseController show all
Defined in:
app/controllers/account/credits_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

caches_page_with_cache_marker, #raise_not_found!

Instance Method Details

#indexObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/account/credits_controller.rb', line 7

def index
  params[:per] = 10 if params[:per].blank? || params[:per].to_i < 1
  @credits = .filtered_credits(params)

  unless request.format.to_sym == :xlsx
    @m_params = params.dup
    @m_params[:per] = 2
    @m_credits = @credits.per(2)
  end

  @xlsx_filename = 'transactions'

  respond_with @credits
end