Class: Lolita::Processors::RequestProcessor::IndexActionProcessor

Inherits:
Lolita::Processors::RequestProcessor show all
Defined in:
lib/lolita/processors/request_processor.rb

Instance Attribute Summary

Attributes inherited from Lolita::Processors::RequestProcessor

#scope

Instance Method Summary collapse

Methods inherited from Lolita::Processors::RequestProcessor

#initialize, #resource_class, respond_to

Constructor Details

This class inherits a constructor from Lolita::Processors::RequestProcessor

Instance Method Details

#pageObject



29
30
31
# File 'lib/lolita/processors/request_processor.rb', line 29

def page
  resource_class.lolita.list.paginate(1)
end

#respondObject



23
24
25
26
27
# File 'lib/lolita/processors/request_processor.rb', line 23

def respond
  build_response = resource_class.lolita.list.build(:page => page)
  scope.instance_variable_set(:"@component_builder",build_response)
  scope.haml :"lolita/rest/index.html", :layout => :"layouts/lolita/application.html"
end