app/controllers/admin/flights_controller.rb
# use UTC not the Pilot's TZ
use UTC not the Pilot's TZ
use UTC not the Pilot ' s TZ
def index
      authorize Flight, :index?
      @q = policy_scope(Flight).ransack(params[:q])
      default_sort = ['airline_name asc', 'number asc', 'leg asc']
      @q.sorts = default_sort if @q.sorts.empty?
      @flights = @q.result.page(params[:page])
    end
def index authorize Flight , :index? @q = policy_scope ( Flight ) . ransack ( params [ :q ] ) default_sort = [ 'airline_name asc' , 'number asc' , 'leg asc' ] @q . sorts = default_sort if @q . sorts . empty? @flights = @q . result . page ( params [ :page ] ) end
use UTC not the Pilot's TZ
use UTC not the Pilot ' s TZ