paperclip_database_storage 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,6 @@ class PaperclipDatabaseStorage::AttachmentsController < ApplicationController
14
14
  raise ActionController::RoutingError.new('Too many images found. Check your route definition') if attachments.length > 1
15
15
 
16
16
  attachment = attachments.first
17
- send_data attachment.file_data, :type => attachment.content_type
17
+ send_data attachment.file_data, :type => attachment.content_type, :disposition => attachment.content_type.strip =~ /^image/ ? 'inline' : 'attachment'
18
18
  end
19
19
  end
data/config/routes.rb CHANGED
@@ -1,4 +1,4 @@
1
- Rails.application.routes.draw do
1
+ Rails.application.routes.prepend do
2
2
  # Dynamically create routes based on defined attachments
3
3
  Rails.application.eager_load!
4
4
 
@@ -1,3 +1,3 @@
1
1
  module PaperclipDatabaseStorage
2
- VERSION = "3.0.1" unless defined? PaperclipDatabaseStorage::VERSION
2
+ VERSION = "3.0.2" unless defined? PaperclipDatabaseStorage::VERSION
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip_database_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: