lib/ezprint/railtie.rb in historian_ezprint-0.2.1 vs lib/ezprint/railtie.rb in historian_ezprint-0.2.2
- old
+ new
@@ -3,10 +3,10 @@
require 'ezprint/pdf_helper'
class Railtie < Rails::Railtie
initializer :init_mime_types do
- Mime::Type.register 'application/pdf', :pdf
+ Mime::Type.register 'application/pdf', :pdf unless Mime::Type.lookup_by_extension(:pdf)
end
initializer :insert_into_action_controller do
ActiveSupport.on_load :action_controller do
ActionController::Base.send(:include, EzPrint::PdfHelper)