How can I render an HTML view into a string(saved in the database) to be able to render it back from it in rails?
def show_offer
respond_to do |format|
format.html { render 'offer_template_one', :layout => 'templates'}
format.pdf do
render :pdf => 'oferta',
:template => 'templates/show_offer.pdf.erb',
:layout => "layouts/templates.html.erb",
:save_to_file => Rails.root.join('public', "Oferta.pdf")
end
end
end
This is the method through which I'm rendering my view
Thanks!