app/controllers/admin/airlines_controller.rb
def resize_logo
      logo = params[:airline][:logo]
      return if logo.nil?

      begin
        logo = MiniMagick::Image.new(logo.tempfile.path)
        logo.resize '150x25'
      rescue MiniMagick::Error
        # errors here will be caught in model validation
      end
    end
# Re-sizes/reformat the icon on upload
#
Re-sizes/reformat the icon on upload
Re - sizes / reformat the icon on upload
def resize_logo
      logo = params[:airline][:logo]
      return if logo.nil?
      begin
        logo = MiniMagick::Image.new(logo.tempfile.path)
        logo.resize '150x25'
      rescue MiniMagick::Error
      end
    end
def resize_logo logo = params [ :airline ] [ :logo ] return if logo . nil? begin logo = MiniMagick :: Image . new ( logo . tempfile . path ) logo . resize '150x25' rescue MiniMagick :: Error end end
Re-sizes/reformat the icon on upload
Re - sizes / reformat the icon on upload
# errors here will be caught in model validation