diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bf55e05a5..1b4a65b4c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1700,6 +1700,16 @@ module ApplicationHelper } end + def render_if_exist(options = {}, locals = {}, &block) + if options[:partial] + if lookup_context.exists?(options[:partial], lookup_context.prefixes, true) + render(options, locals, &block) + end + else + render(options, locals, &block) + end + end + private def wiki_helper |