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
| <h2>Client page...</h2> | |
| <p> | |
| <p>Имя: <%= @client.name %></p> | |
| <p>Телефон: <%= @client.phone %></p> | |
| <p>Дата записи: <%= @client.datestamp %></p> | |
| <p>Ваш парикмахер: <%= @client.barber %></p> | |
| <p style="background-color:<%= @client.color %>">Ваш цвет: <%= @client.color %></p> | |
| </p> |
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
| <div class="form-group"> | |
| <label>Ваш парикмахер:</label> | |
| <select name="barber" class="form-control"> | |
| <% @barbers.each do |item| %> | |
| <option <%= @barber == item['name'] ? 'selected' : '' %>><%= item['name'] %></option> | |
| <% end %> | |
| </select> | |
| </div> |
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 CreateBarbers < ActiveRecord::Migration[5.1] | |
| def change | |
| create_table :barbers do |t| | |
| t.text :name | |
| t.timestamps | |
| end | |
| end | |
| end |
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
| # CREATE TABLE IF NOT EXISTS "Users"("id" INTEGER PRIMARY KEY AUTOINCREMENT, "user_name" TEXT, "phone" TEXT, "date_stamp" TEXT, "barber" TEXT, "color" TEXT); |
NewerOlder