From 058a84945a310c97e03d5e8a68a69dcd8c5591de Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Fri, 12 Jan 2018 09:24:53 +0200 Subject: [PATCH] Extract partial --- app/views/registrant/domains/_domain.html.erb | 6 ++++++ app/views/registrant/domains/index.html.erb | 19 ++----------------- 2 files changed, 8 insertions(+), 17 deletions(-) create mode 100644 app/views/registrant/domains/_domain.html.erb diff --git a/app/views/registrant/domains/_domain.html.erb b/app/views/registrant/domains/_domain.html.erb new file mode 100644 index 000000000..b3bf4d334 --- /dev/null +++ b/app/views/registrant/domains/_domain.html.erb @@ -0,0 +1,6 @@ + + <%= link_to domain, registrant_domain_path(domain) %> + <%= link_to domain.registrant.name, registrant_contact_path(domain.registrant) %> + <%= l domain.expire_time %> + <%= link_to domain.registrar, registrant_registrar_path(domain.registrar) %> + diff --git a/app/views/registrant/domains/index.html.erb b/app/views/registrant/domains/index.html.erb index 4b5db200a..43a9122eb 100644 --- a/app/views/registrant/domains/index.html.erb +++ b/app/views/registrant/domains/index.html.erb @@ -93,24 +93,9 @@ + - <% @domains.each do |domain| %> - - - <%= link_to domain, registrant_domain_path(domain) %> - - - <%= link_to domain.registrant.name, registrant_contact_path(domain.registrant) %> - - - <%= l domain.expire_time %> - - - <%= link_to domain.registrar, registrant_registrar_path(domain.registrar) %> - - -
- <% end %> + <%= render @domains %>