mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
commit
9b9fb2f8aa
4 changed files with 4 additions and 12 deletions
|
@ -1,7 +1,6 @@
|
|||
<tr>
|
||||
<td><%= zone.origin %></td>
|
||||
<td><%= link_to zone.origin, edit_admin_zone_path(zone), id: 'admin-edit-zone-btn' %></td>
|
||||
<td>
|
||||
<%= link_to t('.edit_btn'), edit_admin_zone_path(zone), class: 'btn btn-xs btn-primary' %>
|
||||
<%= link_to t('.generate_zone_file_btn'),
|
||||
admin_zonefiles_path(origin: zone.origin),
|
||||
method: 'post', class: 'btn btn-xs btn-primary' %>
|
||||
|
|
|
@ -29,5 +29,4 @@ en:
|
|||
update_btn: Update zone
|
||||
|
||||
zone:
|
||||
edit_btn: Edit
|
||||
generate_zone_file_btn: Generate zone file
|
||||
|
|
|
@ -14,14 +14,8 @@ class AddZoneToPrices < ActiveRecord::Migration
|
|||
private
|
||||
|
||||
def assign_zone_to_current_prices
|
||||
p "Categories: #{Billing::Price.pluck(:category).uniq.sort}"
|
||||
p "Zone origins: #{DNS::Zone.origins.sort}"
|
||||
p 'Converting...'
|
||||
|
||||
Billing::Price.all.each do |price|
|
||||
p "Price: #{price.attributes}"
|
||||
p "Price category: #{price.category}"
|
||||
zone = DNS::Zone.find_by!(origin: price.category.strip)
|
||||
zone = DNS::Zone.find_by!(origin: price.category)
|
||||
price.zone = zone
|
||||
price.save!
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ RSpec.feature 'Editing zone in admin area', settings: false do
|
|||
end
|
||||
|
||||
scenario 'updates zone' do
|
||||
open_list
|
||||
visit admin_zones_url
|
||||
open_form
|
||||
submit_form
|
||||
|
||||
|
@ -20,7 +20,7 @@ RSpec.feature 'Editing zone in admin area', settings: false do
|
|||
end
|
||||
|
||||
def open_form
|
||||
click_link_or_button t('admin.dns.zones.zone.edit_btn')
|
||||
click_link_or_button 'admin-edit-zone-btn'
|
||||
end
|
||||
|
||||
def submit_form
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue