spree-contrib / spree_print_invoice

Create a PDF invoice for Spree orders.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
91 stars 240 forks source link

prawn_options preference not defined (NoMethodError) #74

Open tvdeyen opened 9 years ago

tvdeyen commented 9 years ago

Following the readme of the current 3-0-stable branch I get an

preferable.rb:62:in `has_preference!': prawn_options preference not defined (NoMethodError)

error.

This is how my config looks like:

# config/initializers/spree.rb
Spree::PrintInvoice::Config.set(
  prawn_options: {
    page_layout: :portrait,
    page_size: 'A4'
  }
)

Maybe the readme is outdated?

rkusa commented 9 years ago

Stumbled upon the same issue. The Readme seems to be outdated. The following works

Spree::PrintInvoice::Config.set(
    page_layout: :portrait,
    page_size: 'A4'
)