app/controllers/admin/fleets_controller.rb
def resize_image
      image = params[:fleet][:image]
      return if image.nil?

      begin
        image = MiniMagick::Image.new(image.tempfile.path)
        image.resize '175x260>'
      rescue MiniMagick::Error
        # errors here will be caught in model validation
      end
    end
# Re-sizes/reformat the image on upload
#
Re-sizes/reformat the image on upload
Re - sizes / reformat the image on upload
def resize_image
      image = params[:fleet][:image]
      return if image.nil?
      begin
        image = MiniMagick::Image.new(image.tempfile.path)
        image.resize '175x260>'
      rescue MiniMagick::Error
      end
    end
def resize_image image = params [ :fleet ] [ :image ] return if image . nil? begin image = MiniMagick :: Image . new ( image . tempfile . path ) image . resize '175x260>' rescue MiniMagick :: Error end end
Re-sizes/reformat the image on upload
Re - sizes / reformat the image on upload
# errors here will be caught in model validation