Skip to content

Instantly share code, notes, and snippets.

View b-murphy's full-sized avatar
😁

Brendan b-murphy

😁
  • Product Story
  • London, England
View GitHub Profile
require 'virtus'
class Authenticator
# Required for Errors & Messages
##########################################
include Virtus
extend ActiveModel::Naming
include ActiveModel::Conversion
include ActiveModel::Validations
require './lib/enthuse/social_network_mappings'
require 'virtus'
class Authenticator
# Required for Errors & Messages
##########################################
include Virtus
extend ActiveModel::Naming
include ActiveModel::Conversion
include ActiveModel::Validations
# create the template
template = PageOfflineTemplate.new
template.quote = quote
template.pages = quote.build_pages
# Here I render a template with layout to a string then a PDF
pdf = PDFKit.new template.render_to_string(:template=>"quotes/review.html.haml")