This file contains 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
1 - Установить соединение с базой данных. (set :database, "sqlite3:barbershop.db") | |
2 - Создаем модель (Класс) class Barber < ActiveRecord::Base end | |
3 - Создаем файл миграции утилитой rake ( rake db:create_migration NAME=name_of_migration) | |
4 - Редактируем файл миграции | |
create_table :clients do |t| | |
t.text :name | |
t.text :phone | |
t.text :datestamp | |
t.text :barber |
This file contains 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
базовые команды | |
git clone адрес репозитория - клонировать репозиторий на локальный компютер | |
git commit -m 'initial commit' комит изменений в локальный репозиторий | |
git push -u origin master - только первый раз отправка изменений в удаленный репозиторий | |
git push - все последующие разы отправка изменений в удаленный репозиторий | |
окат изменений | |
git pull - скачивается актуальная версия удаленного репозитория и все изменения применяются к локальному репозиторию | |
checkout - перейти в другую ветку | |
discard - не отправлять в репозиторий те изменения которые нам не нравятся |
This file contains 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
# git commands ------------------------------------------------- | |
git version # узнать версию git | |
git pool # загрузить изменения из указанного ранее github(pool - тянуть) | |
git clone ...repo... # загрузить полностью исходники из репозитория | |
git reset --hard HEAD | |
This file contains 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
* * * * * mac * * * * * * | |
1 - gem install rails | |
Утилита tux | |
добавить запись в БД Пример - Barber.create :name => 'Text' | |
-=-=-=-=-=-=- О пакетах -=-=-==-=-=-=-=-- |
This file contains 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
txt = "123" | |
arr = Array.new(30) { Array.new(5) } | |
arr2 = [] | |
arr2 << txt | |
arr[0][0] << arr2 | |
puts arr |
NewerOlder