Skip to content

Commit

Permalink
Reorder null dropdates to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
cavis committed Aug 7, 2023
1 parent 1dd793d commit 7ebebac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/episodes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def index
filtered_episodes = episodes.filter_by_title(params[:q])

@published_episodes = filtered_episodes.published.order(published_at: :desc).page(params[:published_page]).per(10)
@scheduled_episodes = filtered_episodes.draft_or_scheduled.order(released_at: :asc).page(params[:scheduled_page]).per(10)
@scheduled_episodes = filtered_episodes.draft_or_scheduled.order("released_at ASC NULLS FIRST").page(params[:scheduled_page]).per(10)
end

# GET /episodes/1
Expand Down

0 comments on commit 7ebebac

Please sign in to comment.