diff --git a/app/views/emails/edit.html.erb b/app/views/emails/edit.html.erb index 80347f448..aac9b0704 100644 --- a/app/views/emails/edit.html.erb +++ b/app/views/emails/edit.html.erb @@ -8,7 +8,7 @@ <%= edit_form_for(@user, url: user_email_path(@user)) do |f| %> <%= f.input :password %> - <%= f.input :email %> + <%= f.input :email, as: :email, input_html: { value: "" } %> <%= f.submit "Save" %> <% end %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 80ca23b11..97eef0faf 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -15,7 +15,7 @@
<%= edit_form_for(@user, html: { id: "signup-form" }) do |f| %> <%= f.input :name, as: :string %> - <%= f.input :email, label: "Email", required: false, as: :email, hint: "Optional" %> + <%= f.input :email, label: "Email", required: false, as: :email, input_html: { value: "" }, hint: "Optional" %> <%= f.input :password %> <%= f.input :password_confirmation %> diff --git a/db/migrate/20200325074859_drop_emails_from_users.rb b/db/migrate/20200325074859_drop_emails_from_users.rb new file mode 100644 index 000000000..e327142ee --- /dev/null +++ b/db/migrate/20200325074859_drop_emails_from_users.rb @@ -0,0 +1,5 @@ +class DropEmailsFromUsers < ActiveRecord::Migration[6.0] + def change + remove_column :users, :email, :string + end +end diff --git a/db/structure.sql b/db/structure.sql index a9e13f43c..b5d3db372 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2201,7 +2201,6 @@ CREATE TABLE public.users ( id integer NOT NULL, name character varying NOT NULL, level integer DEFAULT 20 NOT NULL, - email character varying, inviter_id integer, created_at timestamp without time zone NOT NULL, last_logged_in_at timestamp without time zone DEFAULT now(), @@ -6989,13 +6988,6 @@ CREATE INDEX index_user_name_change_requests_on_user_id ON public.user_name_chan CREATE INDEX index_users_on_created_at ON public.users USING btree (created_at); --- --- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_users_on_email ON public.users USING btree (email) WHERE (email IS NOT NULL); - - -- -- Name: index_users_on_inviter_id; Type: INDEX; Schema: public; Owner: - -- @@ -7371,6 +7363,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20200309035334'), ('20200309043653'), ('20200318224633'), -('20200325073456'); +('20200325073456'), +('20200325074859');