Closed kleinjm closed 3 years ago
Calling Airports.find_by_iata_code("LHR") produces
Airports.find_by_iata_code("LHR")
ArgumentError: wrong number of arguments (given 1, expected 0; required keywords: name, city, country, iata, icao, latitude, longitude, altitude, timezone, dst, tz_name)
The fix (I've confirmed) is to splat the hash here https://github.com/timrogers/airports/blob/v1.6.1/lib/airports.rb#L44 Ie. Airport.new(**transformed_hash)
Airport.new(**transformed_hash)
Calling
Airports.find_by_iata_code("LHR")
producesThe fix (I've confirmed) is to splat the hash here https://github.com/timrogers/airports/blob/v1.6.1/lib/airports.rb#L44 Ie.
Airport.new(**transformed_hash)