/printable

Add simple printing helper for Rails controllers

Primary LanguageRubyMIT LicenseMIT

Printable
=========

Printable is a plugin simplifying printing using CUPS from Rails
applications.


Example
=======

In the controller there is a new method made available by this plugin:

* print_action_for(method, options = {})

Use it like this:

  class InvoicesController < ApplicationController
    print_action_for :shipping_document, :tray => :plain, :media => 'A5'
    print_action_for :invoice, :tray => :invoice
    print_action_for :reminder, :tray => :invoice

    def shipping_document
      [...]
    end

    def invoice
      [...]
    end

    def reminder
      [...]
    end
  end


License
=======

Copyright (c) 2009-2010 Simon Hürlimann <simon.huerlimann@cyt.ch>
Copyright (c) 2009-2010 ZytoLabor <http://www.zyto-labor.com>

Released under the MIT license.