forked from saurabh/orbit4-5
added a msg for module frontend problem
This commit is contained in:
parent
2f3e60b0df
commit
0cca5ec1b2
|
@ -230,7 +230,7 @@ module ApplicationHelper
|
|||
end
|
||||
html.html_safe
|
||||
else
|
||||
""
|
||||
return "<div>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!! :( </div>"
|
||||
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 "<div>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!! :( </div>"
|
||||
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
|
||||
|
|
|
@ -78,7 +78,7 @@ module PagesHelper
|
|||
end
|
||||
html.html_safe
|
||||
else
|
||||
""
|
||||
return "<div>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!! :( </div>"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue