
#RAILS PDFKIT WINDOWS#

Rails 3.1.0 Problems using haml - Missing template error.I get `this.getOptions is not a function` error when using coffee-loader on Rails 6.1.Error using devise_token_auth gem Rails 7.Error creating Rails DB using rake db:create.rails 3 - path error when using form_for on a resource.Why do I get a "no listener" error when using Rails with Oracle?.Downloading S3 files(objects) using aws-sdk for ruby in rails.Rails EOF Error when using HTTP.get_response to retrieve Facebook access token.sending error message in json using ruby on rails.Can't build URI for an image_tag using carrier wave Ruby on Rails Carrierwave: Argument Error Nil location provided.Getting 'undefined method `view_paths=' for # Did you mean? view_paths' error using PDFKit in Rails.Downloading PDF's using PDFkit error on Rails.Therefore, when you call send_data() in the controller, you are explicitly rendering something, so the default rendering of the action_ file doesn't occur. Specify whether the browser should display the response as a fileĪttachment (i.e. This method is similar to render plain: data, but also allows you to Of a controller action, Rails will automatically look for theĪction_ template in the controller's view path and render

The rule is that if you do not explicitly render something at the end Or, if you want to read the view file then run it through the ERB engine, something like this: file_path = File.expand_path("./views/input/", _FILE_)Įrb_template = Input.find_by(id: params)īy default, controllers in Rails automatically render views with names Send_data pdf, :filename => pany + ".pdf", Kit = PDFKit.new(html, :page_size => 'Letter') You need to do something like: input = Input.find_by(id: params)
#RAILS PDFKIT CODE#
Your code doesn't assign anything to the instance variable def = Input.find_by(id: params)Īnd instance variables have a default value of nil.
