Fix code style
This commit is contained in:
parent
907ecff5dd
commit
4899bd651f
2 changed files with 16 additions and 12 deletions
|
@ -11,7 +11,7 @@ class PassportPolicy < ApplicationPolicy
|
|||
|
||||
def permitted_attributes_for_create
|
||||
[
|
||||
images: [],
|
||||
images: [],
|
||||
passport_map_attributes: %i[
|
||||
surname given_name patronymic sex date_of_birth place_of_birth series
|
||||
number issued_by unit_code date_of_issue
|
||||
|
|
|
@ -2,16 +2,20 @@
|
|||
|
||||
class RemoveMappingFromPassports < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_column :passports, :surname, :string, null: false
|
||||
remove_column :passports, :given_name, :string, null: false
|
||||
remove_column :passports, :patronymic, :string
|
||||
remove_column :passports, :sex, :integer, null: false
|
||||
remove_column :passports, :date_of_birth, :date, null: false
|
||||
remove_column :passports, :place_of_birth, :string, null: false
|
||||
remove_column :passports, :series, :integer, null: false
|
||||
remove_column :passports, :number, :integer, null: false
|
||||
remove_column :passports, :issued_by, :text, null: false
|
||||
remove_column :passports, :unit_code, :string, null: false
|
||||
remove_column :passports, :date_of_issue, :date, null: false
|
||||
# rubocop:disable Rails/ReversibleMigration
|
||||
change_table :passports, bulk: true do |t|
|
||||
t.remove :surname
|
||||
t.remove :given_name
|
||||
t.remove :patronymic
|
||||
t.remove :sex
|
||||
t.remove :date_of_birth
|
||||
t.remove :place_of_birth
|
||||
t.remove :series
|
||||
t.remove :number
|
||||
t.remove :issued_by
|
||||
t.remove :unit_code
|
||||
t.remove :date_of_issue
|
||||
end
|
||||
# rubocop:enable Rails/ReversibleMigration
|
||||
end
|
||||
end
|
||||
|
|
Reference in a new issue