Reorder code
This commit is contained in:
parent
03450ab538
commit
7c11e4944a
7 changed files with 7 additions and 7 deletions
|
@ -6,10 +6,10 @@
|
|||
<%= f.input :date_of_birth, start_year: Date.today.year - 150,
|
||||
end_year: Date.today.year %>
|
||||
<%= f.input :occupation %>
|
||||
<%= f.input :comment %>
|
||||
<%= f.input :email %>
|
||||
<%= f.input :phone_number %>
|
||||
<%= f.input :telegram_username %>
|
||||
<%= f.input :comment %>
|
||||
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
||||
|
|
|
@ -11,7 +11,7 @@ en:
|
|||
middle_name: Middle name
|
||||
date_of_birth: Date of birth
|
||||
occupation: Occupation
|
||||
comment: Comment
|
||||
email: Email
|
||||
phone_number: Phone number
|
||||
telegram_username: Telegram username
|
||||
comment: Comment
|
||||
|
|
|
@ -11,7 +11,7 @@ ru:
|
|||
middle_name: Отчество
|
||||
date_of_birth: Дата рождения
|
||||
occupation: Профессия или род деятельности
|
||||
comment: Комментарий
|
||||
email: Адрес электронной почты
|
||||
phone_number: Телефонный номер
|
||||
telegram_username: Имя пользователя в Telegram
|
||||
comment: Комментарий
|
||||
|
|
|
@ -10,10 +10,10 @@ class CreateMembershipApplications < ActiveRecord::Migration[5.2]
|
|||
t.string :middle_name
|
||||
t.date :date_of_birth, null: false
|
||||
t.string :occupation
|
||||
t.text :comment
|
||||
t.string :email, null: false
|
||||
t.string :phone_number, null: false
|
||||
t.string :telegram_username
|
||||
t.text :comment
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,10 +23,10 @@ ActiveRecord::Schema.define(version: 2018_11_26_132402) do
|
|||
t.string "middle_name"
|
||||
t.date "date_of_birth", null: false
|
||||
t.string "occupation"
|
||||
t.text "comment"
|
||||
t.string "email", null: false
|
||||
t.string "phone_number", null: false
|
||||
t.string "telegram_username"
|
||||
t.text "comment"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -7,9 +7,9 @@ FactoryBot.define do
|
|||
middle_name { Faker::Name.first_name }
|
||||
date_of_birth { Faker::Date.backward }
|
||||
occupation { Faker::Company.profession }
|
||||
comment { Faker::Lorem.paragraph }
|
||||
email { Faker::Internet.email }
|
||||
phone_number { Faker::PhoneNumber.phone_number }
|
||||
telegram_username { Faker::Internet.username }
|
||||
comment { Faker::Lorem.paragraph }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,8 +10,8 @@ RSpec.describe MembershipApplication, type: :model do
|
|||
it { is_expected.not_to validate_presence_of :middle_name }
|
||||
it { is_expected.to validate_presence_of :date_of_birth }
|
||||
it { is_expected.not_to validate_presence_of :occupation }
|
||||
it { is_expected.not_to validate_presence_of :comment }
|
||||
it { is_expected.to validate_presence_of :email }
|
||||
it { is_expected.to validate_presence_of :phone_number }
|
||||
it { is_expected.not_to validate_presence_of :telegram_username }
|
||||
it { is_expected.not_to validate_presence_of :comment }
|
||||
end
|
||||
|
|
Reference in a new issue