Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix on rake task #670

Closed
wants to merge 1 commit into from

2 participants

@ramorim

Error when try to execute String's method strip on Mime Type object

@ramorim ramorim Fix on rake task
Error when try to execute String's method strip on Mime Type object
ae07191
@ramorim

Same issue committed by @npadgett in #669

@sikachu
Owner

I choose to merge #669 in. Thank you for reporting in!

@sikachu sikachu closed this
@ramorim

Ok. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 10, 2011
  1. @ramorim

    Fix on rake task

    ramorim authored
    Error when try to execute String's method strip on Mime Type object
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/tasks/paperclip.rake
View
2  lib/tasks/paperclip.rake
@@ -47,7 +47,7 @@ namespace :paperclip do
Paperclip.each_instance_with_attachment(klass, name) do |instance|
if file = instance.send(name).to_file(:original)
instance.send("#{name}_file_name=", instance.send("#{name}_file_name").strip)
- instance.send("#{name}_content_type=", file.content_type.strip)
+ instance.send("#{name}_content_type=", file.content_type.to_s.strip)
instance.send("#{name}_file_size=", file.size) if instance.respond_to?("#{name}_file_size")
if Rails.version >= "3.0.0"
instance.save(:validate => false)
Something went wrong with that request. Please try again.