user blocking

This commit is contained in:
Karol Selak 2021-03-21 23:43:09 +01:00
parent ccb6e23960
commit 2804c55fd9
9 changed files with 44 additions and 11 deletions

View file

@ -0,0 +1,5 @@
class AddStatusToUsers < ActiveRecord::Migration[6.1]
def change
add_column :users, :status, :integer
end
end

3
db/schema.rb generated
View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_03_21_135711) do
ActiveRecord::Schema.define(version: 2021_03_21_213901) do
create_table "authors", force: :cascade do |t|
t.string "first_name"
@ -45,6 +45,7 @@ ActiveRecord::Schema.define(version: 2021_03_21_135711) do
t.datetime "updated_at", precision: 6, null: false
t.string "recovery_password_digest"
t.integer "role"
t.integer "status"
end
end

View file

@ -40,16 +40,19 @@ User.create([
{
email: 'abc@o2.pl',
password: 'aaaaaaaa',
role: :admin
role: :admin,
status: :ready
},
{
email: 'abcd@o2.pl',
password: 'aaaaaaaa',
role: :customer
role: :customer,
status: :ready
},
{
email: 'abcde@o2.pl',
password: 'aaaaaaaa',
role: :customer
role: :customer,
status: :ready
},
])