Module: Apique::Listable
- Extended by:
- ActiveSupport::Concern
- Includes:
- Basics
- Included in:
- Filterable, Paginatable, Sortable
- Defined in:
- lib/apique/listable.rb
Overview
Basic functional for retrieving collections of records.
Instance Method Summary collapse
-
#index ⇒ Object
GET /api/plural_resource_name.
Instance Method Details
#index ⇒ Object
GET /api/plural_resource_name
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/apique/listable.rb', line 58 def index join_relations! if respond_to? :filter_collection!, true filter_collection! end if respond_to? :sort_collection!, true sort_collection! end if respond_to? :paginate_collection!, true paginate_collection! end render json: subject_collection, apique_format: params[:f] || 'default' end |