Class: Tally::DaysController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Tally::DaysController
- Defined in:
- app/controllers/tally/days_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/tally/days_controller.rb', line 4 def index records = search.days.page(params[:page]).per(params[:per_page] || 24).without_count render json: { days: records.map(&:day), meta: { next_page: records.next_page, current_page: records.current_page, previous_page: records.prev_page, per_page: records.limit_value } } end |