This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Hello world from slq. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| psql slq@slq-home | |
| psql (9.6.10) | |
| Введите "help", чтобы получить справку. | |
| Создайте базу данных test_guru | |
| CREATE DATABASE test_guru; | |
| CREATE DATABASE | |
| =================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BasketController | |
| #класс BasketController должен буть унаследован от класса ApplicationController | |
| def add_to_basket | |
| =begin | |
| поиск по :item_title не корректен так как может привести к наслоению | |
| одинаковых заказов в корзине, лучше использовать поиск по :id | |
| item = Item.find_by_id(params[:id]) | |
| =end |