From f298ec54e7e463eee6c4ecf32918b010e1bc29a8 Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Tue, 6 Jun 2017 07:58:46 +0200 Subject: [PATCH] Code beautification per @zmagod's request Closes SCI-1321. --- app/helpers/tiny_mce_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/tiny_mce_helper.rb b/app/helpers/tiny_mce_helper.rb index beef299e6..62431604d 100644 --- a/app/helpers/tiny_mce_helper.rb +++ b/app/helpers/tiny_mce_helper.rb @@ -18,7 +18,7 @@ module TinyMceHelper end def generate_image_tag_from_token(text) - return nil if text.nil? + return unless text regex = /\[~tiny_mce_id:([0-9a-zA-Z]+)\]/ text.gsub(regex) do |el| match = el.match(regex)