Class: Ishapi::LeadsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ishapi/leads_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#exception, #home, #long_term_token, #vote

Instance Method Details

#indexObject



8
9
10
11
12
13
14
# File 'app/controllers/ishapi/leads_controller.rb', line 8

def index
  authorize! :leads_index, ::Ishapi
  out = Lead.all.page( params[:leads_page] ).per( @current_profile.per_page )
  render json: {
    items: out,
  }
end