diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b2f353f..15c83d9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -230,7 +230,7 @@ module ApplicationHelper end html.html_safe else - "" + return "
It seems we have a problem with the module at this point of time, we will try to fix it as soon as possible, Sorry for the inconvenience!! :(
" end else f = File.join(Rails.root, 'app', 'templates', "#{@key}", 'modules', params[:target_controller].singularize, "#{params[:target_action]}.html.erb") @@ -239,9 +239,12 @@ module ApplicationHelper doc = Nokogiri::HTML(file, nil, "UTF-8") file.close controller = "#{params[:target_controller].capitalize}_controller".classify.constantize.new - data = controller.send("#{params[:target_action]}") + data = controller.send("#{params[:target_action]}") rescue nil + if data.nil? + return "
It seems we have a problem with the module at this point of time, we will try to fix it as soon as possible, Sorry for the inconvenience!! :(
" + end - if data.blank? || data.empty? || data.nil? + if data.blank? || data.empty? file = File.open("#{Rails.root}/public/404.html") doc = Nokogiri::HTML(file, nil, "UTF-8") file.close diff --git a/app/helpers/pages_helper.rb b/app/helpers/pages_helper.rb index b6658fc..5e318c8 100644 --- a/app/helpers/pages_helper.rb +++ b/app/helpers/pages_helper.rb @@ -78,7 +78,7 @@ module PagesHelper end html.html_safe else - "" + return "
It seems we have a problem with the module at this point of time, we will try to fix it as soon as possible, Sorry for the inconvenience!! :(
" end end