[fix]Remove duplicate code

This commit is contained in:
Jimmy 2021-04-22 01:24:14 +08:00
parent 83e4601ddb
commit bafeca7ab9
No known key found for this signature in database
GPG key ID: FAE75C760A4A5CC6
3 changed files with 12 additions and 24 deletions

View file

@ -183,16 +183,4 @@ class ProposalsController < ApplicationController
def user_params
params.require(:user).permit(:email, :password, :password_confirmation, :username)
end
def load_happening_now
events_schedules_list = get_happening_now_events_schedules(@conference)
@is_happening_next = false
if events_schedules_list.empty?
events_schedules_list = get_happening_next_events_schedules(@conference)
@is_happening_next = true
end
@events_schedules_limit = EVENTS_PER_PAGE
@events_schedules_length = events_schedules_list.length
@pagy, @events_schedules = pagy_array(events_schedules_list, items: @events_schedules_limit, link_extra: 'data-remote="true"')
end
end