Added Website Settings

This commit is contained in:
MrYummy
2017-05-28 17:46:39 -04:00
parent db3aea185b
commit a24d26dd7c
16 changed files with 236 additions and 60 deletions

View File

@@ -0,0 +1,5 @@
class AddUtcTimeToUsers < ActiveRecord::Migration
def change
add_column :users, :utc_time, :boolean, default: false
end
end

View File

@@ -0,0 +1,5 @@
class AddHeaderScrollToUsers < ActiveRecord::Migration
def change
add_column :users, :header_scroll, :boolean, default: false
end
end

View File

@@ -0,0 +1,5 @@
class AddDarkToUsers < ActiveRecord::Migration
def change
add_column :users, :dark, :boolean, default: false
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170409135858) do
ActiveRecord::Schema.define(version: 20170515200733) do
create_table "blogposts", force: :cascade do |t|
t.string "title", limit: 191
@@ -133,6 +133,7 @@ ActiveRecord::Schema.define(version: 20170409135858) do
t.boolean "confirmed", default: false
t.datetime "last_seen"
t.integer "role_id", limit: 4, null: false
t.integer "badge_id"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "mail_own_thread_reply", default: true
@@ -140,7 +141,9 @@ ActiveRecord::Schema.define(version: 20170409135858) do
t.boolean "mail_own_blogpost_comment", default: true
t.boolean "mail_other_blogpost_comment", default: true
t.boolean "mail_mention", default: true
t.integer "badge_id"
t.boolean "header_scroll", default: false
t.boolean "utc_time", default: false
t.boolean "dark", default: false
end
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree

View File

@@ -36,7 +36,10 @@ deleted_user = User.create!(
skype_public: true,
last_ip: "0.0.0.0",
confirmed: true,
last_seen: Time.utc(0).to_datetime
last_seen: Time.utc(0).to_datetime,
header_scroll: false,
utc_time: false,
dark: false
)
deleted_user.update_attribute(:ign, "Steve")
@@ -47,46 +50,9 @@ User.create!(
password: "123456789", # high seructity!
password_confirmation: "123456789",
role: Role.get(:superadmin),
header_scroll: false,
utc_time: false,
dark: false
badge: Badge.get(:donor),
confirmed: true
)
User.create!(
uuid: "7f52491ab5d64c11b4a43806db47a101",
ign: "YummyRedstone",
email: "yummy@example.com",
password: "123456789", # high seructity!
password_confirmation: "123456789",
role: Role.get(:admin),
badge: Badge.get(:lead),
confirmed: true
)
User.create!(
uuid: "d2693e9193e14e3f929ff38e1ce8df03",
ign: "Pepich1851",
email: "pepe@example.com",
password: "123456789", # high seructity!
password_confirmation: "123456789",
role: Role.get(:superadmin),
badge: Badge.get(:retired),
confirmed: true
)
User.create!(
uuid: "c69f8316c60a4f8ca922bda933e01acd",
ign: "Doomblah",
email: "doom@example.com",
password: "123456789", # high seructity!
password_confirmation: "123456789",
role: Role.get(:normal),
badge: Badge.get(:developer),
confirmed: true
)
User.create!(
uuid: "b85a91b558b0474da2a42d5dd025f9e5",
ign: "Futsy",
email: "futsy@example.com",
password: "123456789", # high seructity!
password_confirmation: "123456789",
role: Role.get(:mod),
badge: Badge.get(:none),
confirmed: true
)