1. Ruby / Говнокод #23944

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    @requests  = Request.where(instrument_id: 1).where("state_id not in (12,3,5,8,13,15,4)").where(id: current_user.arr_request_services).order(priority_id: :desc, updated_at: :desc, id: :desc) #.page(params[:page]).per_page(20)
            @requests1 = Request.where(instrument_id: 1).where(locked_by: current_user).where("state_id not in (12,3,5,8,13,15,4)").order(priority_id: :desc, updated_at: :desc, id: :desc)
            @requests2 = Request.where(instrument_id: 1).where(author_id: current_user.id).where("state_id not in (12,3,5,8,13,15,4)").order(priority_id: :desc, updated_at: :desc, id: :desc)
            @requests3 = Request.where(instrument_id: 1).where(owner_id: current_user.id).where("state_id not in (12,3,5,8,13,15,4)").order(priority_id: :desc, updated_at: :desc, id: :desc)
            @requests  = (@requests + @requests1 + @requests2 + @requests3).uniq

    Что это ?

    Запостил: eggshke, 17 Марта 2018

    Комментарии (4) RSS

    Добавить комментарий