Module: Smooth::Presentable::Controller

Extended by:
ActiveSupport::Concern
Defined in:
lib/smooth/presentable/controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



11
12
13
14
15
16
17
# File 'lib/smooth/presentable/controller.rb', line 11

def index
  records = base_scope.present(params)
                .as(presenter_format)
                .to(current_user_role)

  render :json => records.results, :root=> false
end