diff --git a/app/controllers/hosts_controller.rb b/app/controllers/hosts_controller.rb
index 376314c..ff48fae 100644
--- a/app/controllers/hosts_controller.rb
+++ b/app/controllers/hosts_controller.rb
@@ -25,6 +25,10 @@ class HostsController < ApplicationController
record
end
+ def beginning_of_chain
+ super.includes(:domain).where(:domains => {:name => Settings.host_domains})
+ end
+
def before_create_save(record)
record.user = current_user
end
diff --git a/app/models/a.rb b/app/models/a.rb
index 39be01f..0b58de7 100644
--- a/app/models/a.rb
+++ b/app/models/a.rb
@@ -15,7 +15,7 @@ class A < Record
validates :content, :presence => true, :ip => {:ip_type => :v4} # Only accept valid IPv4 addresses
attr_accessor :host_domain
- validates :host_domain, :inclusion => {:in => Settings.host_domains}
+ validates :host_domain, :inclusion => {:in => Settings.host_domains}, :allow_blank => true
before_validation do
if host_domain.present? && Settings.host_domains.include?(host_domain)
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb
index f7ffeba..685fa99 100644
--- a/app/views/devise/registrations/edit.html.erb
+++ b/app/views/devise/registrations/edit.html.erb
@@ -32,6 +32,8 @@
<%= link_to "Back", :back %>
+
diff --git a/app/views/fragments/_bottom.html.erb b/app/views/fragments/_bottom.html.erb index 49dd432..1c787c6 100644 --- a/app/views/fragments/_bottom.html.erb +++ b/app/views/fragments/_bottom.html.erb @@ -1,10 +1,12 @@
diff --git a/app/views/fragments/_top.html.erb b/app/views/fragments/_top.html.erb index c7fabdd..8e5b371 100644 --- a/app/views/fragments/_top.html.erb +++ b/app/views/fragments/_top.html.erb @@ -19,9 +19,6 @@