Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use Rails.application.assets #106

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

sepastian
Copy link

Use asset_path instead.

See #105.

peterberkenbosch and others added 15 commits February 11, 2015 20:22
In order to make customization of the build in template much easier, we introduce a generator that copy the templates into the app.

Fixes spree-contrib#78
Remove selenium support and update poltergeist.

Adds new settings store_pdf and storage_path

Adds pdf file generation to order model.

The order can now render itself to pdf.

Delegate order controller show :pdf action to order.

The controller now tells the order to render itself as pdf and to store it, if enabled.

Fix pdf templates.

Add javascript injection to install generator.

Mention store pdf feature in readme

Updates invoice number on pdf render in controller.

Like before: it sets the invoice number to next incremential value, if enabled.

Stub configuration for more reliable tests

Fixes spree-contrib#80
Bump spree_core dependency from beta
as this can cause problems for precompiling

context 'with invoice number present' do
before do
order.invoice_number = "1000"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -3,6 +3,10 @@ module Generators
class InstallGenerator < Rails::Generators::Base
class_option :auto_run_migrations, type: :boolean, default: true

def add_javascripts
append_file "vendor/assets/javascripts/spree/backend/all.js", "//= require spree/backend/spree_print_invoice\n"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer single-quoted strings when you don't need string interpolation or special symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants