mercredi 14 septembre 2016

sidekiq generate pdf in rails

I am trying to generate pdf file and save in server, i got the following error when i copied controller code to sidekiq

render_to_string undefined method 

so i added following line

ac = ActionController::Base.new()
ac.render_to_string(.....)

Now the problem is application helper is not loading, i tried include applicationhelper, als

ac.view.class.include ApplicationHelper

Which didnt work, any suggestion how to include application helper in sidekiq

I also followed this generating pdf files with sidekiq worker pdf is downloading, but now opening, its in different format

Aucun commentaire:

Enregistrer un commentaire