Skip to content

Commit

Permalink
Remove mail templates feature as buggy and unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Beljajev committed May 16, 2019
1 parent e0d3e14 commit 44380fd
Show file tree
Hide file tree
Showing 17 changed files with 7 additions and 271 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ gem 'selectize-rails', '0.12.1' # include selectize.js for select
gem 'kaminari', '0.16.3' # pagination
gem 'coderay', '1.1.0' # xml console visualize
gem 'select2-rails', '3.5.9.3' # for autocomplete
gem 'liquid', '3.0.6' # for email templates

# rights
gem 'cancancan', '1.11.0' # autharization
Expand Down
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ GEM
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
libxml-ruby (3.0.0)
liquid (3.0.6)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand Down Expand Up @@ -472,7 +471,6 @@ DEPENDENCIES
jquery-rails (= 4.0.4)
jquery-ui-rails (= 5.0.5)
kaminari (= 0.16.3)
liquid (= 3.0.6)
mina (= 0.3.1)
money-rails
nokogiri
Expand Down
63 changes: 0 additions & 63 deletions app/controllers/admin/mail_templates_controller.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def admin # Admin/admin_user dynamic role
can :manage, LegalDocument
can :manage, BankStatement
can :manage, BankTransaction
can :manage, MailTemplate
can :manage, Invoice
can :manage, WhiteIp
can :manage, AccountActivity
Expand Down
3 changes: 0 additions & 3 deletions app/models/mail_template.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/views/admin/base/_menu.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
%li= link_to t('.zones'), admin_zones_path
%li= link_to t('.blocked_domains'), admin_blocked_domains_path
%li= link_to t('.reserved_domains'), admin_reserved_domains_path
%li= link_to t(:mail_templates), admin_mail_templates_path
%li= link_to t('.epp_log'), admin_epp_logs_path(created_after: 'today')
%li= link_to t('.repp_log'), admin_repp_logs_path(created_after: 'today')
%li= link_to t('.que'), '/admin/que'
Expand Down
54 changes: 0 additions & 54 deletions app/views/admin/mail_templates/_form.haml

This file was deleted.

3 changes: 0 additions & 3 deletions app/views/admin/mail_templates/edit.haml

This file was deleted.

26 changes: 0 additions & 26 deletions app/views/admin/mail_templates/index.haml

This file was deleted.

3 changes: 0 additions & 3 deletions app/views/admin/mail_templates/new.haml

This file was deleted.

41 changes: 0 additions & 41 deletions app/views/admin/mail_templates/show.haml

This file was deleted.

5 changes: 0 additions & 5 deletions config/locales/admin/mail_templates.en.yml

This file was deleted.

1 change: 0 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ en:
created_at_until: 'Created at until'
is_registrant: 'Is registrant'
force_delete_set_on_domain: 'Force delete set on domain %{domain_name}'
mail_templates: Mail Templates
contact_is_not_valid: 'Contact %{value} is not valid, please fix the invalid contact'
next: 'Next'
previous: 'Previous'
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@
end
end

resources :mail_templates
resources :account_activities

resources :bank_statements do
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20190506100655_remove_mail_templates.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RemoveMailTemplates < ActiveRecord::Migration
def change
drop_table :mail_templates
end
end
54 changes: 2 additions & 52 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1944,43 +1944,6 @@ CREATE SEQUENCE public.log_white_ips_id_seq
ALTER SEQUENCE public.log_white_ips_id_seq OWNED BY public.log_white_ips.id;


--
-- Name: mail_templates; Type: TABLE; Schema: public; Owner: -; Tablespace:
--

CREATE TABLE public.mail_templates (
id integer NOT NULL,
name character varying NOT NULL,
subject character varying,
"from" character varying,
bcc character varying,
cc character varying,
body text NOT NULL,
text_body text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone
);


--
-- Name: mail_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.mail_templates_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;


--
-- Name: mail_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.mail_templates_id_seq OWNED BY public.mail_templates.id;


--
-- Name: nameservers; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
Expand Down Expand Up @@ -2794,13 +2757,6 @@ ALTER TABLE ONLY public.log_users ALTER COLUMN id SET DEFAULT nextval('public.lo
ALTER TABLE ONLY public.log_white_ips ALTER COLUMN id SET DEFAULT nextval('public.log_white_ips_id_seq'::regclass);


--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.mail_templates ALTER COLUMN id SET DEFAULT nextval('public.mail_templates_id_seq'::regclass);


--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -3228,14 +3184,6 @@ ALTER TABLE ONLY public.log_white_ips
ADD CONSTRAINT log_white_ips_pkey PRIMARY KEY (id);


--
-- Name: mail_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--

ALTER TABLE ONLY public.mail_templates
ADD CONSTRAINT mail_templates_pkey PRIMARY KEY (id);


--
-- Name: nameservers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
Expand Down Expand Up @@ -4945,6 +4893,8 @@ INSERT INTO schema_migrations (version) VALUES ('20190328151838');

INSERT INTO schema_migrations (version) VALUES ('20190415120246');

INSERT INTO schema_migrations (version) VALUES ('20190506100655');

INSERT INTO schema_migrations (version) VALUES ('20190510090240');

INSERT INTO schema_migrations (version) VALUES ('20190510102549');
Expand Down
14 changes: 0 additions & 14 deletions test/system/admin_area/mail_templates/new_test.rb

This file was deleted.

0 comments on commit 44380fd

Please sign in to comment.