Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue #11: Don't register Mime types if they're already registered

  • Loading branch information...
commit 3de9830e990ccdeb1e3446d59b59939788fd8b03 1 parent 600583e
@peternash authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/rqrcode-rails3.rb
View
6 lib/rqrcode-rails3.rb
@@ -4,8 +4,8 @@
require 'rqrcode-rails3/renderers/svg.rb'
module RQRCode
- Mime::Type.register "image/svg+xml", :svg
- Mime::Type.register "image/png", :png
+ Mime::Type.register "image/svg+xml", :svg unless Mime::Type.lookup_by_extension(:svg)
+ Mime::Type.register "image/png", :png unless Mime::Type.lookup_by_extension(:png)
extend SizeCalculator
@@ -27,4 +27,4 @@ module RQRCode
self.response_body = render_to_string(:text => data, :template => nil)
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.