Skip to content

Instantly share code, notes, and snippets.

View spartakusQ's full-sized avatar
🏠
Working from home

Sergey Tamchenko spartakusQ

🏠
Working from home
View GitHub Profile
Hello world from slq.
psql slq@slq-home
psql (9.6.10)
Введите "help", чтобы получить справку.
Создайте базу данных test_guru
CREATE DATABASE test_guru;
CREATE DATABASE
===================================================
ncat -C httpbin.org 80 slq@slq-home
GET / HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.9.0
Date: Mon, 08 Oct 2018 14:43:02 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 10122
class BasketController
#класс BasketController должен буть унаследован от класса ApplicationController
def add_to_basket
=begin
поиск по :item_title не корректен так как может привести к наслоению
одинаковых заказов в корзине, лучше использовать поиск по :id
item = Item.find_by_id(params[:id])
=end