added a few privacy options to users

This commit is contained in:
nilsding 2015-01-03 21:43:19 +01:00
parent fd4e66bb75
commit b3348dbfff
2 changed files with 33 additions and 17 deletions

View File

@ -0,0 +1,12 @@
class AddPrivacyOptionsToUsers < ActiveRecord::Migration
def change
%i{
privacy_allow_anonymous_questions
privacy_allow_public_timeline
privacy_allow_stranger_answers
privacy_show_in_search
}.each do |sym|
add_column :users, sym, :boolean, default: true
end
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: 20150102231343) do
ActiveRecord::Schema.define(version: 20150103200732) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -169,6 +169,10 @@ ActiveRecord::Schema.define(version: 20150102231343) do
t.integer "crop_w"
t.integer "crop_h"
t.boolean "supporter", default: false
t.boolean "privacy_allow_anonymous_questions", default: true
t.boolean "privacy_allow_public_timeline", default: true
t.boolean "privacy_allow_stranger_answers", default: true
t.boolean "privacy_show_in_search", default: true
end
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree