-
actionview::templateerror (undefined method `empresa' for nil:nilclass) on line #21 of app/views/layouts/pdf.html.erb:
18: <%= stylesheet link tag "/stylesheets/main small.css" %>
19:
20:
21: <% @imagem = @online.empresa.imagens.find by tipo('relatorio') unless @online.empresa.nil? %>
22:
23: <% unless @imagem.nil? %>
24:
app/views/layouts/pdf.html.erb:21
lib/fusion/web/helpers/pdf web site helper.rb:47:in `make pdf'
lib/fusion/web/helpers/pdf web site helper.rb:74:in `make and send pdf'
lib/fusion/web/paginas fixas.rb:170:in `produto pdf'
app/controllers/home controller.rb:377:in `model transactions'
lib/fusion/rack encoding.rb:10:in `call'
puma (2.8.2) lib/puma/configuration.rb:71:in `call'
puma (2.8.2) lib/puma/server.rb:490:in `handle request'
puma (2.8.2) lib/puma/server.rb:361:in `process client'
puma (2.8.2) lib/puma/server.rb:254:in `block in run'
puma (2.8.2) lib/puma/thread pool.rb:92:in `block in spawn thread'
Verifique os erros abaixo:
ActionView::TemplateError (undefined method `empresa' for nil:NilClass) on line #21 of app/views/layouts/pdf.html.erb:
18: <%= stylesheet_link_tag "/stylesheets/main_small.css" %>
19:
20:
21: <% @imagem = @online.empresa.imagens.find_by_tipo('relatorio') unless @online.empresa.nil? %>
22: