engine/app/helpers/locomotive/sites_helper.rb

12 lines
241 B
Ruby
Raw Normal View History

module Locomotive::SitesHelper
def error_on_domain(site, name)
if (error = (site.errors[:domains] || []).detect { |n| n.include?(name) })
content_tag(:span, error, :class => 'inline-errors')
else
''
end
end
end