pagination happening now

This commit is contained in:
madhekare 2021-04-07 20:56:03 -07:00
parent 27f83ddd18
commit 77b6dac6a2
8 changed files with 188 additions and 1 deletions

View file

@ -3,6 +3,7 @@
class ApplicationController < ActionController::Base
before_action :set_paper_trail_whodunnit
include ApplicationHelper
include Pagy::Backend
add_flash_types :error
protect_from_forgery with: :exception, prepend: true
before_action :store_location

View file

@ -72,7 +72,8 @@ class ConferencesController < ApplicationController
@sponsors = @conference.sponsors
end
if splashpage.include_happening_now
@events_schedules = get_happening_now_events_schedules(@conference)
@event_list = get_happening_now_events_schedules(@conference)
@pagy, @events_schedules = pagy_array(@event_list, items: 2)
@happening_now_url = happening_now_conference_schedule_path(conference_id: @conference.short_title, format: :json)
end
end