From c1cef82c15fb7f6e0c3a591c90f10910a88ace61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Sun, 1 Mar 2015 19:32:52 +0100 Subject: [PATCH] Start generating guide again for empty profile We stopped generating guide for empty profile after 1ffbdcd0939e8cf30d7db8f11fceff9dfdbadf86 which confused if @scap_content.nil? or @scap_content.source.nil? with if self.scap_content.blank? || self.scap_content_profile.blank? This is partial revert. As well it is anecdotal evidence about ineffectiveness of peer reviews and merrits of small commits. --- app/models/scaptimony/policy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/scaptimony/policy.rb b/app/models/scaptimony/policy.rb index f695bc3..6b7566b 100644 --- a/app/models/scaptimony/policy.rb +++ b/app/models/scaptimony/policy.rb @@ -20,7 +20,7 @@ def assign_assets(a) end def to_html - if self.scap_content.blank? || self.scap_content_profile.blank? + if self.scap_content.nil? || self.scap_content.source.nil? return (_('

Cannot generate HTML guide for %{scap_content}/%{profile}

') % { :scap_content => self.scap_content, :profile => self.scap_content_profile }).html_safe end