A small fix
This commit is contained in:
		
							parent
							
								
									a3468274ff
								
							
						
					
					
						commit
						dd3caa1161
					
				| @ -79,22 +79,22 @@ class AvatarUploader < CarrierWave::Uploader::Base | |||||||
| 	#	super(*versions) | 	#	super(*versions) | ||||||
| 	#end | 	#end | ||||||
| 
 | 
 | ||||||
| 	def manipulate! | #	def manipulate! | ||||||
| 		cache_stored_file! if !cached? | #		cache_stored_file! if !cached? | ||||||
| 		image = ::MiniMagick::Image.open(current_path) | #		image = ::MiniMagick::Image.open(current_path) | ||||||
| 
 | # | ||||||
| 		begin | #		begin | ||||||
| 			image.format(@format.to_s.downcase) if @format | #			image.format(@format.to_s.downcase) if @format | ||||||
| 			image = yield(image) | #			image = yield(image) | ||||||
| 			image.write(current_path) | #			image.write(current_path) | ||||||
| 			image.run_command("identify", '"' + current_path + '"') | #			image.run_command("identify", '"' + current_path + '"') | ||||||
| 		ensure | #		ensure | ||||||
| 			image.destroy! | #			image.destroy! | ||||||
| 		end | #		end | ||||||
| 	rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e | #	rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e | ||||||
| 		default = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :locale => :en) | #		default = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :locale => :en) | ||||||
| 		message = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :default => default) | #		message = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :default => default) | ||||||
| 		raise CarrierWave::ProcessingError, message | #		raise CarrierWave::ProcessingError, message | ||||||
| 	end | #	end | ||||||
| 
 | 
 | ||||||
| end | end | ||||||
|  | |||||||
| @ -39,22 +39,22 @@ class PosterUploader < CarrierWave::Uploader::Base | |||||||
| 		image['width'] > image['height'] | 		image['width'] > image['height'] | ||||||
| 	end | 	end | ||||||
| 
 | 
 | ||||||
| 	def manipulate! | #	def manipulate! | ||||||
| 		cache_stored_file! if !cached? | #		cache_stored_file! if !cached? | ||||||
| 		image = ::MiniMagick::Image.open(current_path) | #		image = ::MiniMagick::Image.open(current_path) | ||||||
| 
 | # | ||||||
| 		begin | #		begin | ||||||
| 			image.format(@format.to_s.downcase) if @format | #			image.format(@format.to_s.downcase) if @format | ||||||
| 			image = yield(image) | #			image = yield(image) | ||||||
| 			image.write(current_path) | #			image.write(current_path) | ||||||
| 			image.run_command("identify", '"' + current_path + '"') | #			image.run_command("identify", '"' + current_path + '"') | ||||||
| 		ensure | #		ensure | ||||||
| 			image.destroy! | #			image.destroy! | ||||||
| 		end | #		end | ||||||
| 	rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e | #	rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e | ||||||
| 		default = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :locale => :en) | #		default = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :locale => :en) | ||||||
| 		message = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :default => default) | #		message = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :default => default) | ||||||
| 		raise CarrierWave::ProcessingError, message | #		raise CarrierWave::ProcessingError, message | ||||||
| 	end | #	end | ||||||
| 
 | 
 | ||||||
| end | end | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								config/unicorn.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								config/unicorn.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | rails_env = ENV['RAILS_ENV'] || 'production' | ||||||
| @ -15,7 +15,7 @@ namespace :regenerate do | |||||||
| 	end | 	end | ||||||
| 
 | 
 | ||||||
| 	task organization_covers: :environment do | 	task organization_covers: :environment do | ||||||
| 		#Organization.all.each {|m| m.cover.recreate_versions!} | 		Organization.all.each {|m| m.cover.recreate_versions!} | ||||||
|         puts Rails.configuration.database_configuration[Rails.env].to_json.to_s |         #puts Rails.configuration.database_configuration[Rails.env].to_json.to_s | ||||||
| 	end | 	end | ||||||
| end | end | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user