diff --git a/app/models/profile.rb b/app/models/profile.rb index db08a43b8..2bb1269f5 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -18,7 +18,6 @@ class Profile < ApplicationRecord education: :education, git_lab_url: :gitlab_url, linked_in_url: :linkedin_url, - recruiters_can_contact_me_about_job_opportunities: :contact_consent, skills_languages: :mostly_work_with, stack_overflow_url: :stackoverflow_url }.with_indifferent_access.freeze diff --git a/app/policies/user_policy.rb b/app/policies/user_policy.rb index 7fe551077..4cd3d525d 100644 --- a/app/policies/user_policy.rb +++ b/app/policies/user_policy.rb @@ -7,7 +7,6 @@ class UserPolicy < ApplicationPolicy config_font config_theme config_navbar - contact_consent currently_hacking_on currently_learning display_announcements diff --git a/app/services/profile_fields/add_work_fields.rb b/app/services/profile_fields/add_work_fields.rb index 81b979213..972fa47af 100644 --- a/app/services/profile_fields/add_work_fields.rb +++ b/app/services/profile_fields/add_work_fields.rb @@ -7,7 +7,6 @@ module ProfileFields field "Employer name", :text_field, placeholder: "Acme Inc.", display_area: "header" field "Employer URL", :text_field, placeholder: "https://dev.com", display_area: "settings_only" field "Employment title", :text_field, placeholder: "Junior Frontend Engineer", display_area: "header" - field "Recruiters can contact me about job opportunities", :check_box, display_area: "settings_only" end end end diff --git a/db/migrate/20210111045049_drop_contact_consent_from_user.rb b/db/migrate/20210111045049_drop_contact_consent_from_user.rb new file mode 100644 index 000000000..f14b09880 --- /dev/null +++ b/db/migrate/20210111045049_drop_contact_consent_from_user.rb @@ -0,0 +1,5 @@ +class DropContactConsentFromUser < ActiveRecord::Migration[6.0] + def change + safety_assured { remove_column :users, :contact_consent } + end +end diff --git a/db/schema.rb b/db/schema.rb index 826a7949e..68e1fa366 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1211,7 +1211,6 @@ ActiveRecord::Schema.define(version: 2021_01_11_151630) do t.datetime "confirmation_sent_at" t.string "confirmation_token" t.datetime "confirmed_at" - t.boolean "contact_consent", default: false t.datetime "created_at", null: false t.integer "credits_count", default: 0, null: false t.datetime "current_sign_in_at" diff --git a/lib/data/dev_profile_fields.csv b/lib/data/dev_profile_fields.csv index afa1ddc6c..7371bd1f8 100644 --- a/lib/data/dev_profile_fields.csv +++ b/lib/data/dev_profile_fields.csv @@ -17,7 +17,6 @@ Education,text_field,,,Work,header,false Employer name,text_field,Acme Inc.,,Work,header,false Employer URL,text_field,https://dev.com,,Work,header,false Employment title,text_field,Junior Frontend Engineer,,Work,header,false -Recruiters can contact me about job opportunities,check_box,,,Work,settings_only,false Skills/Languages,text_area,,What tools and languages are you most experienced with? Are you specialized or more of a generalist?,Coding,left_sidebar,false Currently learning,text_area,,"What are you learning right now? What are the new tools and languages you're picking up right now?",Coding,left_sidebar,false Currently hacking on,text_area,,What projects are currently occupying most of your time?,Coding,left_sidebar,false diff --git a/spec/lib/data_update_scripts/create_profile_fields_spec.rb b/spec/lib/data_update_scripts/create_profile_fields_spec.rb index bdced85de..3061717e8 100644 --- a/spec/lib/data_update_scripts/create_profile_fields_spec.rb +++ b/spec/lib/data_update_scripts/create_profile_fields_spec.rb @@ -15,7 +15,7 @@ describe DataUpdateScripts::CreateProfileFields do it "creates all profile fields and groups" do expect do described_class.new.run - end.to change { profile_field_and_group_count }.from([0, 0]).to([26, 5]) + end.to change { profile_field_and_group_count }.from([0, 0]).to([25, 5]) end end @@ -29,7 +29,7 @@ describe DataUpdateScripts::CreateProfileFields do expect do described_class.new.run end.not_to change { profile_field_and_group_count } - expect(profile_field_and_group_count).to eq [26, 5] + expect(profile_field_and_group_count).to eq [25, 5] end end end