do not run bushido subdomain validation if the value does not get changed + prevent to change the subdomain in Heroku (non multi-sites mode)
This commit is contained in:
parent
e03d7b5dcc
commit
f16201f6cd
@ -15,7 +15,7 @@
|
||||
= f.custom_input :subdomain, :css => 'path' do
|
||||
%em
|
||||
http://
|
||||
= f.text_field :subdomain
|
||||
= f.text_field :subdomain, :disabled => (manage_subdomain? ? '' : 'disabled')
|
||||
\.
|
||||
%em
|
||||
= application_domain
|
||||
|
@ -22,7 +22,7 @@ module Locomotive
|
||||
protected
|
||||
|
||||
def subdomain_availability
|
||||
return true if self.new_record?
|
||||
return true if self.new_record? || !self.subdomain_changed?
|
||||
|
||||
unless ::Bushido::App.subdomain_available?(self.subdomain)
|
||||
self.errors.add(:subdomain, :exclusion)
|
||||
|
Loading…
Reference in New Issue
Block a user